/** * 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; } }
this.loc.close(); this.loc = null;
public void close() { if (!fromParent) { try { if (last.getByteStream() != null) { last.getByteStream().close(); } } catch (IOException e) { //ignore } } parent.close(); }
public void close() { if (!fromParent) { try { if (last.getByteStream() != null) { last.getByteStream().close(); } } catch (IOException e) { //ignore } } parent.close(); }
public void close() { if (!fromParent) { try { if (last.getByteStream() != null) { last.getByteStream().close(); } } catch (IOException e) { //ignore } } parent.close(); }
/** * 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; } }
this.loc.close(); this.loc = null;
this.loc.close(); this.loc = null;
/** * Parses the WSDL document. * * @param source the Source for reading the document * @param context the introspection context * @return the parsed WSDL * @throws InstallException if an unexpected error occurs */ private Definition parseWsdl(Source source, IntrospectionContext context) throws InstallException { WSDLLocator locator = new SourceWsdlLocator(source, context); try { WSDLReader reader = factory.newReader(); Definition definition = reader.readWSDL(locator); if (!definition.getNamespaces().values().contains("http://schemas.xmlsoap.org/wsdl/soap/")) { // Workaround for a bug in WSDL4J where a WSDL document does not reference the SOAP namespace and an attempt is made to serialize it, // an exception is thrown. definition.addNamespace("soap11", "http://schemas.xmlsoap.org/wsdl/soap/"); } parseSchemaLocation(definition, context); return definition; } catch (WSDLException e) { throw new InstallException(e); } finally { locator.close(); } }