public static Description readWSDL(URI wsdlURI) { Description description = null; try { description = reader.read(wsdlURI.toURL()); } catch (WSDLException e) { } catch (MalformedURLException e) { } catch (IOException e) { } catch (URISyntaxException e) { } return description; }
public BPELFromWSDLManager(URL wsdlURL) throws WSDLException, MalformedURLException, IOException, URISyntaxException{ Description wsdlBpel = reader.read(wsdlURL); Iterator<InterfaceType> itInterfaces = wsdlBpel.getInterfaces().iterator(); while(itInterfaces.hasNext()){ InterfaceType currentInterface = itInterfaces.next(); BPELProject project = new BPELGeneratorImpl().generateDefaultBPELProjectFromInterface(currentInterface.getQName(), wsdlBpel); this.bpelProjects.add(project); } }
/** * This method is used for unit tests where it will take a wsdl file saved in a local file structure and * process. * * @param pathToWSDL Path to the wsdl file */ public void init(String pathToWSDL) { try { WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); URL url = (new File(pathToWSDL)).toURI().toURL(); this.desc = reader.read(url); this.messages = ((org.ow2.easywsdl.wsdl.impl.wsdl11.DescriptionImpl) desc).getMessages(); createMapOfComplexTypes(); } catch (URISyntaxException e) { logger.error("Error occurred while retrieving wsdl file", e); } catch (MalformedURLException e) { logger.error("URL provided is incorrect", e); } catch (IOException e) { logger.error("Error occurred while reading the wsdl file " + pathToWSDL, e); } catch (SchemaException e) { logger.error("Error occurred while resolving schema types ", e); } }
WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); URL url = (new File(fullPath)).toURI().toURL(); this.desc = reader.read(url);
@Override public Document addManageabilityReferencesInInterfaceOfEndpoint(final URL wsdl, final QName serviceName, final String endpoint) throws WSDMException { Document doc = null; try { final Description desc = WSDLFactory.newInstance().newWSDLReader().read(wsdl); doc = WSDMDescriptionImpl.addManageabilityReferencesInInterfaceOfEndpoint(desc, serviceName, endpoint); } catch (final WSDLException e) { throw new WSDMException(e); } catch (final IOException e) { throw new WSDMException(e); } catch (final URISyntaxException e) { throw new WSDMException(e); } return doc; }
final Description wsdm = getReader().read(wsdlUrl);