org.apache.axis2.jaxws.util
Class CatalogURIResolver

java.lang.Object
  extended by org.apache.axis2.jaxws.util.CatalogURIResolver
All Implemented Interfaces:
org.apache.ws.commons.schema.resolver.URIResolver

public class CatalogURIResolver
extends java.lang.Object
implements org.apache.ws.commons.schema.resolver.URIResolver

This resolver provides the means of resolving the imports and includes of a given schema document. It allows the use of the Apache Commons Resolver API to redirect resource requests to alternative locations.


Constructor Summary
CatalogURIResolver(JAXWSCatalogManager catalogManager)
          CatalogURIResolver constructor.
 
Method Summary
protected  java.net.URL getFileURL(java.net.URL contextURL, java.lang.String path)
          Method getFileURL
 java.lang.String getRedirectedURI(java.lang.String importURI, java.lang.String parent)
          Resolves URIs using Apache Commons Resolver API.
protected  java.net.URL getURL(java.net.URL contextURL, java.lang.String spec)
          This is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.
protected  boolean isAbsolute(java.lang.String uri)
          Find whether a given uri is relative or not
 org.xml.sax.InputSource resolveEntity(java.lang.String namespace, java.lang.String schemaLocation, java.lang.String baseUri)
          As for the resolver the public ID is the target namespace of the schema and the schemaLocation is the value of the schema location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogURIResolver

public CatalogURIResolver(JAXWSCatalogManager catalogManager)
CatalogURIResolver constructor. Resolves WSDL URIs using Apache Commons Resolver API.

Parameters:
catalogManager - the OASISCatalogManager which will determine the settings for the XML catalog
Method Detail

getRedirectedURI

public java.lang.String getRedirectedURI(java.lang.String importURI,
                                         java.lang.String parent)
Resolves URIs using Apache Commons Resolver API.

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

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String namespace,
                                             java.lang.String schemaLocation,
                                             java.lang.String baseUri)
As for the resolver the public ID is the target namespace of the schema and the schemaLocation is the value of the schema location

Specified by:
resolveEntity in interface org.apache.ws.commons.schema.resolver.URIResolver
Parameters:
namespace -
schemaLocation -
baseUri -

isAbsolute

protected boolean isAbsolute(java.lang.String uri)
Find whether a given uri is relative or not

Parameters:
uri -
Returns:
boolean

getURL

protected java.net.URL getURL(java.net.URL contextURL,
                              java.lang.String spec)
                       throws java.io.IOException
This is essentially a call to "new URL(contextURL, spec)" with extra handling in case spec is a file.

Parameters:
contextURL -
spec -
Throws:
java.io.IOException

getFileURL

protected java.net.URL getFileURL(java.net.URL contextURL,
                                  java.lang.String path)
                           throws java.io.IOException
Method getFileURL

Parameters:
contextURL -
path -
Throws:
java.io.IOException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.