/** * 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; } }
String base = locator.getBaseURI();
/** * sets a custom WSDL locator * * @param customResolver */ public void setCustomWSDLResolver(WSDLLocator customResolver) { this.customWSDLResolver = customResolver; setDocumentBaseUri(this.customWSDLResolver.getBaseURI()); }
/** * sets a custom WSDL locator * * @param customResolver */ public void setCustomWSDLResolver(WSDLLocator customResolver) { this.customWSDLResolver = customResolver; setDocumentBaseUri(this.customWSDLResolver.getBaseURI()); }
/** * 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; } }
/** * 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; } }
String base = locator.getBaseURI();
String base = locator.getBaseURI();
public static Definition readWsdl(WSDLLocator locator) { try { final WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); wsdlReader.setFeature("javax.wsdl.verbose", false); wsdlReader.setFeature("javax.wsdl.importDocuments", true); return wsdlReader.readWSDL(locator); } catch (final WsdlException e) { throw e; } catch (final Exception e) { throw new WsdlException("Problem while reading wsdl file at URL : " + locator.getBaseURI(), e); } }
def.setDocumentBaseURI(customWSDLResolver.getBaseURI()); return def; } else {
def.setDocumentBaseURI(customWSDLResolver.getBaseURI()); return def; } else {