Class AARBasedWSDLLocator
- java.lang.Object
-
- org.apache.ws.commons.schema.resolver.DefaultURIResolver
-
- org.apache.axis2.deployment.resolver.AARBasedWSDLLocator
-
- All Implemented Interfaces:
javax.wsdl.xml.WSDLLocator
,org.apache.woden.resolver.URIResolver
,org.apache.ws.commons.schema.resolver.CollectionURIResolver
,org.apache.ws.commons.schema.resolver.URIResolver
public class AARBasedWSDLLocator extends org.apache.ws.commons.schema.resolver.DefaultURIResolver implements javax.wsdl.xml.WSDLLocator, org.apache.woden.resolver.URIResolver
Custom WSDL locator to load schemas from zip archives Need to provide the aarFile and the baseInputStream for the base WSDL file The logic here is that we only care about the import location all imports must be relative to the META-INF folder
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Log
log
-
Constructor Summary
Constructors Constructor Description AARBasedWSDLLocator(String baseURI, File zipFile, InputStream baseInputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
InputSource
getBaseInputSource()
String
getBaseURI()
As for the zip there is no point in returning a base URIInputSource
getImportInputSource(String parentLocation, String importLocation)
String
getLatestImportURI()
returns the latest importprotected boolean
isAbsolute(String uri)
Override logic in DefaultURIResolver class to include more schemes (protocols)URI
resolveURI(URI uri)
-
-
-
Constructor Detail
-
AARBasedWSDLLocator
public AARBasedWSDLLocator(String baseURI, File zipFile, InputStream baseInputStream)
-
-
Method Detail
-
getBaseInputSource
public InputSource getBaseInputSource()
- Specified by:
getBaseInputSource
in interfacejavax.wsdl.xml.WSDLLocator
-
getImportInputSource
public InputSource getImportInputSource(String parentLocation, String importLocation)
- Specified by:
getImportInputSource
in interfacejavax.wsdl.xml.WSDLLocator
- Parameters:
parentLocation
-importLocation
-
-
getBaseURI
public String getBaseURI()
As for the zip there is no point in returning a base URI- Specified by:
getBaseURI
in interfacejavax.wsdl.xml.WSDLLocator
-
getLatestImportURI
public String getLatestImportURI()
returns the latest import- Specified by:
getLatestImportURI
in interfacejavax.wsdl.xml.WSDLLocator
-
close
public void close()
- Specified by:
close
in interfacejavax.wsdl.xml.WSDLLocator
-
resolveURI
public URI resolveURI(URI uri) throws org.apache.woden.WSDLException, IOException
- Specified by:
resolveURI
in interfaceorg.apache.woden.resolver.URIResolver
- Throws:
org.apache.woden.WSDLException
IOException
-
isAbsolute
protected boolean isAbsolute(String uri)
Override logic in DefaultURIResolver class to include more schemes (protocols)- Overrides:
isAbsolute
in classorg.apache.ws.commons.schema.resolver.DefaultURIResolver
- Parameters:
uri
-- Returns:
- boolean
-
-