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(configContext, axisService);
AxisService service = serviceBuilder.populateService(rootElement);
ArrayList serviceList = new ArrayList();
serviceList.add(service);
return serviceList;
} else if (TAG_SERVICE_GROUP.equals(elementName)) {
ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement, servicesMap,
configContext);
ArrayList servicList = groupBuilder.populateServiceGroup(serviceGroup);
Iterator 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();