/** * Get a WSDLReader. * * @return WSDLReader. * @throws WSDLException * on error. */ private WSDLReader getReader() throws WSDLException { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader wsdlReader = wsdlFactory.newWSDLReader(); ExtensionRegistry registry = wsdlFactory.newPopulatedExtensionRegistry(); wsdlReader.setExtensionRegistry( registry ); wsdlReader.setFeature( "javax.wsdl.verbose", true ); wsdlReader.setFeature( "javax.wsdl.importDocuments", true ); return wsdlReader; }
/** * Load and parse the WSDL file using the wsdlLocator. * * @param wsdlLocator * A WSDLLocator instance. * @param username * to use for authentication * @param password * to use for authentication * @return wsdl Definition. * @throws WSDLException * on error. */ private Definition parse( WSDLLocator wsdlLocator, String username, String password ) throws WSDLException, KettleException, AuthenticationException { WSDLReader wsdlReader = getReader(); try { return wsdlReader.readWSDL( wsdlLocator ); } catch ( WSDLException we ) { readWsdl( wsdlReader, wsdlURI.toString(), username, password ); return null; } }
/** * Read the specified <wsdl:definitions> element into a WSDL * definition. The WSDLLocator is used to provide the document * base URIs. The InputSource of the WSDLLocator is ignored, instead * the WSDL is parsed from the given Element. * * @param locator A WSDLLocator object used to provide * the document base URI of the WSDL definition described by the * element. * @param definitionsElement the <wsdl:definitions> element * @return the definition described by the element. */ public Definition readWSDL(WSDLLocator locator, Element definitionsElement) throws WSDLException { try { this.loc = locator; return readWSDL(locator.getBaseURI(), definitionsElement, null); } finally { locator.close(); this.loc = null; } }
public Definition readWSDLFile(String location) throws WSDLException { WSDLReader reader = getWsdlFactoryInstance().newWSDLReader(); reader.setFeature("javax.wsdl.importDocuments", true); return reader.readWSDL(location); }
InputSource is = locator.getBaseInputSource(); String base = locator.getBaseURI(); this.loc.close(); this.loc = null;
inputSource = loc.getImportInputSource(contextURI, locationURI); String liu = loc.getLatestImportURI(); ? loc.getLatestImportURI() : (url != null) ? url.toString() ? loc.getLatestImportURI() : (url != null) ? url.toString()
public String getLatestImportURI() { if (lastImport != null) { return lastImport; } return parent.getLatestImportURI(); }
public boolean getFeature(String name) throws IllegalArgumentException { return wrapped.getFeature(name); }
private Definition readWsdl( WSDLReader wsdlReader, String uri, String username, String password ) throws WSDLException, KettleException, AuthenticationException { try { HTTPProtocol http = new HTTPProtocol(); Document doc = XMLHandler.loadXMLString( http.get( wsdlURI.toString(), username, password ), true, false ); if ( doc != null ) { return ( wsdlReader.readWSDL( doc.getBaseURI(), doc ) ); } else { throw new KettleException( "Unable to get document." ); } } catch ( MalformedURLException mue ) { throw new KettleException( mue ); } catch ( AuthenticationException ae ) { // re-throw this. If not IOException seems to catch it throw ae; } catch ( IOException ioe ) { throw new KettleException( ioe ); } }
public String getLatestImportURI() { if (lastImport != null) { return lastImport; } return parent.getLatestImportURI(); }
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(wsdlExplicitURI); } });
public String getLatestImportURI() { if (lastImport != null) { return lastImport; } return parent.getLatestImportURI(); }
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(locator); } });
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(wsdlExplicitURL); } });
/** * @see WsdlCompiler#readWSDL(String) */ public final Definition readWSDL(String wsdlUri) throws WSDLException { return this.wsdlReader.readWSDL(wsdlUri); }
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(wsdlExplicitURL); } });
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(locator); } });
public Object run() throws WSDLException { WSDLReader reader = getWSDLReader(); return reader.readWSDL(wsdlExplicitURI); } });
public Definition run() throws WSDLException { return freader.readWSDL(locator); } });