annotations.add(webServiceAnnotation);
}
}
//extract SOAP-over-JMS 1.0 bindings
final JMSEndpointsMetaData endpointsMetaData = new JMSEndpointsMetaData();
if (!map.isEmpty()) {
for (String wsdlLocation : map.keySet()) {
try {
final ResourceRoot resourceRoot = getWsdlResourceRoot(unit, wsdlLocation);
if (resourceRoot == null) continue;
final UnifiedVirtualFile uvf = new VirtualFileAdaptor(resourceRoot.getRoot());
URL url = uvf.findChild(wsdlLocation).toURL();
SOAPAddressWSDLParser parser = new SOAPAddressWSDLParser(url);
for (AnnotationInstance ai : map.get(wsdlLocation)) {
String port = ai.value(PORT_NAME).asString();
String service = ai.value(SERVICE_NAME).asString();
AnnotationValue targetNS = ai.value(TARGET_NAMESPACE);
String tns = targetNS != null ? targetNS.asString() : null;
QName serviceName = new QName(tns, service);
QName portName = new QName(tns, port);
String soapAddress = parser.filterSoapAddress(serviceName, portName, SOAPAddressWSDLParser.SOAP_OVER_JMS_NS);
if (soapAddress != null) {
ClassInfo webServiceClassInfo = (ClassInfo) ai.target();
String beanClassName = webServiceClassInfo.name().toString();
//service name ?
JMSEndpointMetaData endpointMetaData = new JMSEndpointMetaData(endpointsMetaData);
endpointMetaData.setEndpointName(port);
endpointMetaData.setName(beanClassName);
endpointMetaData.setImplementor(beanClassName);
//endpointMetaData.setName(name);
endpointMetaData.setSoapAddress(soapAddress);
endpointMetaData.setWsdlLocation(wsdlLocation);
endpointsMetaData.addEndpointMetaData(endpointMetaData);
}
}
} catch (Exception ignore) {
ROOT_LOGGER.cannotReadWsdl(wsdlLocation);
}