try {
final WSDLFactory factory = WSDLFactory.newInstance();
final WSDLReader reader = factory.newWSDLReader();
reader.setFeature("javax.wsdl.verbose", true);
reader.setFeature("javax.wsdl.importDocuments", true);
final WsdlResolver wsdlResolver = new WsdlResolver(new URL(url, ".").toExternalForm(), new InputSource(IO.read(url)));
definition = reader.readWSDL(wsdlResolver);
} catch (final IOException e) {
throw new OpenEJBException("Cannot read the wsdl file: " + url.toExternalForm(), e);
} catch (final Exception e) {
throw new OpenEJBException("Encountered unknown error parsing the wsdl file: " + url.toExternalForm(), e);