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 Description readWSDL(final URI wsdlURI, WSDLVersionConstants version, InputSource source, Map<URI, AbsItfDescription> descriptionImports, Map<URI, AbsItfSchema> schemaImports) throws WSDLException { org.ow2.easywsdl.wsdl.api.WSDLReader reader = null; Description desc = null; try { if (version == WSDLVersionConstants.WSDL11) { reader = reader11; //reader = new org.ow2.easywsdl.wsdl.impl.wsdl11.WSDLReaderImpl(this.addedObjectFactories); } else if (version == WSDLVersionConstants.WSDL20) { reader = reader20; //reader = new org.ow2.easywsdl.wsdl.impl.wsdl20.WSDLReaderImpl(this.addedObjectFactories); } else { throw new WSDLException("unknown version of wsdl"); } ((AbstractWSDLReaderImpl) reader).setFeatures(this.getFeatures()); } catch (final XmlException e) { throw new WSDLException("unknown version of wsdl", e); } desc = reader.readWSDL(wsdlURI, version, source, descriptionImports, schemaImports); return desc; }
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);