use of javax.wsdl.WSDLException in project tesb-studio-se by Talend.
the class WSDLUtils method getDefinition.
// public static Definition getDefinition(String pathToWsdl) throws CoreException {
// try {
// WSDLFactory wsdlFactory = WSDLFactory.newInstance();
// WSDLReader newWSDLReader = wsdlFactory.newWSDLReader();
//
// newWSDLReader.setExtensionRegistry(wsdlFactory.newPopulatedExtensionRegistry());
// newWSDLReader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false);
// return newWSDLReader.readWSDL(pathToWsdl);
// } catch (WSDLException e) {
// throw new CoreException(StatusUtil.newStatus(IStatus.ERROR, e.getLocalizedMessage(), e));
// }
// }
public static Definition getDefinition(IFile pathToWsdl) throws CoreException {
try {
WSDLFactory wsdlFactory = WSDLFactory.newInstance();
WSDLReader newWSDLReader = wsdlFactory.newWSDLReader();
newWSDLReader.setExtensionRegistry(wsdlFactory.newPopulatedExtensionRegistry());
newWSDLReader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false);
return newWSDLReader.readWSDL(pathToWsdl.getLocationURI().toString());
} catch (WSDLException e) {
throw getCoreException(null, e);
}
}
Aggregations