wsdlLocation = "META-INF/" + serviceName + ".wsdl";
wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation);
wsdlURL = serviceClassLoader.getResource(wsdlLocation);
}
if (wsdlStream != null) {
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
wsdlStream, null, null);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
wsdlLocation, file, wsdlStream));
wsdl2AxisServiceBuilder
.setCustomResolver(new AARFileBasedURIResolver(file));
}
if (wsdlURL != null) {
wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
}
axisService = wsdl2AxisServiceBuilder.populateService();
axisService.setWsdlFound(true);
axisService.setCustomWsdl(true);
axisService.setName(serviceName);
}
if (axisService == null) {
axisService = new AxisService(serviceName);
}
axisService.setParent(serviceGroup);
axisService.setClassLoader(serviceClassLoader);
ServiceBuilder serviceBuilder = new ServiceBuilder(configCtx, axisService);
AxisService service = serviceBuilder.populateService(rootElement);
ArrayList<AxisService> serviceList = new ArrayList<AxisService>();
serviceList.add(service);
return serviceList;
} else if (DeploymentConstants.TAG_SERVICE_GROUP.equals(elementName)) {
ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement,
servicesMap, configCtx);
ArrayList<AxisService> servicList = groupBuilder.populateServiceGroup(serviceGroup);
Iterator<AxisService> serviceIterator = servicList.iterator();
while (serviceIterator.hasNext()) {
AxisService axisService = (AxisService) serviceIterator.next();
String wsdlLocation = "META-INF/service.wsdl";
InputStream wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation);
URL wsdlURL = serviceClassLoader.getResource(wsdlLocation);
if (wsdlStream == null) {
wsdlLocation = "META-INF/" + serviceName + ".wsdl";
wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation);
wsdlURL = serviceClassLoader.getResource(wsdlLocation);
}
if (wsdlStream != null) {
WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
wsdlStream, axisService);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
wsdlLocation, file, wsdlStream));
wsdl2AxisServiceBuilder.setCustomResolver(new AARFileBasedURIResolver(
file));
}
if (wsdlURL != null) {
wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
}
axisService = wsdl2AxisServiceBuilder.populateService();
axisService.setWsdlFound(true);
axisService.setCustomWsdl(true);
// Set the default message receiver for the operations
// that were
// not listed in the services.xml