public void addWsdlImport(URI from, URI wsdlImport, SourceLocation sloc) {
Definition4BPEL def;
try {
WSDLReader r = _wsdlFactory.newWSDLReader();
WSDLLocatorImpl locator = new WSDLLocatorImpl(_resourceFinder, _resourceFinder.resolve(from, wsdlImport));
def = (Definition4BPEL) r.readWSDL(locator);
} catch (WSDLException e) {
recoveredFromError(sloc, new CompilationException(__cmsgs.errWsdlParseError(e
.getFaultCode(), e.getLocation(), e.getMessage())));
throw new CompilationException(__cmsgs.errWsdlImportFailed(wsdlImport.toASCIIString(), e.getFaultCode())
.setSource(sloc), e);
}
try {
_wsdlRegistry.addDefinition(def, _resourceFinder, _resourceFinder.resolve(from, wsdlImport));
if (__log.isDebugEnabled())
__log.debug("Added WSDL Definition: " + wsdlImport);
} catch (CompilationException ce) {
recoveredFromError(sloc, ce);
}
}