private void processExistingWSDL ( String wsdlLocation , Member newMember ) throws InjectionException { // if the wsdlLocation for this service reference is specified in the DD, log a debug statement and continue if ( wsrInfo . getWsdlLocation ( ) != null && ! "" . equals ( wsrInfo . getWsdlLocation ( ) ) ) { if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "For the " + wsrInfo . getJndiName ( ) + " service reference, " + "the " + wsrInfo . getWsdlLocation ( ) + " WSDL file is specified in the " + "deployment descriptor. Annotation metadata referencing a WSDL file for " + "this service reference will be ignored." ) ; } } else { // else we want to set the value to whatever is in the annotation if ( tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "For the " + wsrInfo . getJndiName ( ) + " service reference, " + "setting the wsdlLocation: " + wsdlLocation ) ; } wsrInfo . setWsdlLocation ( wsdlLocation ) ; } }
This will compare the wsdlLocation attribute of the various annotations that have refer to the same service reference . If they differ we will throw an exception as the runtime will not be able to determine which WSDL to use . We will only do this checking if there was not a WSDL location specified in the deployment descriptor . If the DD specifies a deployment descriptor that value will be used and other values will be ignored .