use of org.apache.cxf.wsdl11.WSDLRuntimeException in project cxf by apache.
the class WSDLDefinitionBuilder method parseWSDL.
@SuppressWarnings("unchecked")
protected void parseWSDL(String wsdlURL) {
try {
WSDLManager mgr = bus.getExtension(WSDLManager.class);
registerWSDLExtensibilityPlugins(mgr.getExtensionRegistry());
wsdlDefinition = mgr.getDefinition(wsdlURL);
parseImports(wsdlDefinition);
if (wsdlDefinition.getServices().isEmpty()) {
for (Definition def : importedDefinitions) {
Set<QName> services = def.getServices().keySet();
for (QName sName : services) {
if (!wsdlDefinition.getServices().keySet().contains(sName)) {
wsdlDefinition.getServices().put(sName, def.getService(sName));
}
}
}
}
} catch (Exception we) {
Message msg = new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG, wsdlURL, we.getMessage());
throw new WSDLRuntimeException(msg, we);
}
}
Aggregations