ApplicationClientDescriptor ac = getAppClient();
URI uri = (new File(getAppClientRoot(appClientArchive, ac))).toURI();
File moduleFile = new File(uri);
for (Iterator itr = ac.getServiceReferenceDescriptors().iterator();
itr.hasNext();) {
ServiceReferenceDescriptor serviceRef =
(ServiceReferenceDescriptor) itr.next();
if (serviceRef.getWsdlFileUri()!=null) {
// In case WebServiceRef does not specify wsdlLocation, we get
// wsdlLocation from @WebClient in wsimport generated source;
// If wsimport was given a local WSDL file, then WsdlURI will
// be an absolute path - in that case it should not be prefixed
// with modileFileDir
String wsdlURI = serviceRef.getWsdlFileUri();
File wsdlFile = new File(wsdlURI);
if(wsdlFile.isAbsolute()) {
serviceRef.setWsdlFileUrl(wsdlFile.toURI().toURL());
} else {
// This is the case where WsdlFileUri is a relative path
// (hence relative to the root of this module or wsimport
// was executed with WSDL in HTTP URL form
serviceRef.setWsdlFileUrl(getEntryAsUrl(
moduleFile, serviceRef.getWsdlFileUri()));
}
}
}
}