Class BaseWSDLLocator

  • Direct Known Subclasses:
    CatalogWSDLLocator, ModuleWSDLLocator

    public abstract class BaseWSDLLocator
    extends Object
    This class is the base for an implementation of a WSDL4J interface that will be supplied to a WSDLReader instance. Its primary goal is to assist with locating imported WSDL documents.
    • Field Detail

      • baseURI

        protected String baseURI
      • lastestImportURI

        protected String lastestImportURI
      • baseInputStream

        protected InputStream baseInputStream
    • Constructor Detail

      • BaseWSDLLocator

        public BaseWSDLLocator()
    • Method Detail

      • getInputStream

        protected abstract InputStream getInputStream​(String importPath)
                                               throws IOException
        Returns an InputStream pointed at an imported wsdl pathname relative to the parent resource or loadStrategy.
        Parameters:
        importPath - identifies the WSDL file within the context
        Returns:
        an stream of the WSDL file
        Throws:
        IOException
      • getRedirectedURI

        protected abstract String getRedirectedURI​(String importURI,
                                                   String parent)
        Allows for a level of indirection, such as a catalog, when importing URIs.
        Parameters:
        importURI - a URI specifying the document to import
        parent - a URI specifying the location of the parent document doing the importing
        Returns:
        the resolved import location, or null if no indirection is performed
      • getBaseInputSource

        public InputSource getBaseInputSource()
        Returns an InputSource "pointed at" the base document.
      • getImportInputSource

        public InputSource getImportInputSource​(String parentLocation,
                                                String relativeLocation)
        Returns an InputSource pointed at an imported wsdl document whose parent document was located at parentLocation and whose relative location to the parent document is specified by relativeLocation.
        Parameters:
        parentLocation - a URI specifying the location of the document doing the importing.
        relativeLocation - a URI specifying the location of the document to import, relative to the parent document's location.
      • getBaseURI

        public String getBaseURI()
        Returns a URI representing the location of the base document.
      • getLatestImportURI

        public String getLatestImportURI()
        Returns a URI representing the location of the last import document to be resolved. This is useful when resolving nested imports.
      • convertURI

        protected String convertURI​(String rawURI)
      • isAbsoluteImport

        protected boolean isAbsoluteImport​(String uri)
      • normalizePath

        protected String normalizePath​(String parentLocation,
                                       String relativeLocation)