org.apache.wsif.wsdl
Class WSIFWSDLLocatorImpl

java.lang.Object
  extended byorg.apache.wsif.wsdl.WSIFWSDLLocatorImpl
All Implemented Interfaces:
ClosableLocator, javax.wsdl.xml.WSDLLocator

public class WSIFWSDLLocatorImpl
extends java.lang.Object
implements javax.wsdl.xml.WSDLLocator, ClosableLocator

Implementation of javax.wsdl.xml.WSDLLocator. This class can be used to locate a wsdl document and its imports using a ClassLoader. This is useful when the wsdl is located in a jar/zip file on the classpath.

Author:
Owen Burroughs

Constructor Summary
WSIFWSDLLocatorImpl(java.lang.String docBase, java.io.Reader reader, java.lang.ClassLoader cl)
          Create an instance of WSIFWSDLLocatorImpl.
WSIFWSDLLocatorImpl(java.lang.String ctxt, java.lang.String wsdlURI, java.lang.ClassLoader cl)
          Create an instance of WSIFWSDLLocatorImpl.
 
Method Summary
 void close()
          Close any Reader or stream objects that have been created
 org.xml.sax.InputSource getBaseInputSource()
          Get an InputSource for the base wsdl document.
 java.io.Reader getBaseReader()
          Deprecated. Old WSDLLocator method, no longer on the interface
 java.lang.String getBaseURI()
          Get the document base uri for the base wsdl document
 org.xml.sax.InputSource getImportInputSource(java.lang.String base, java.lang.String relativeLocation)
          Get an InputSource for an imported wsdl document.
 java.io.Reader getImportReader(java.lang.String base, java.lang.String relativeLocation)
          Deprecated. Old WSDLLocator method, no longer on the interface
 java.lang.String getLatestImportURI()
          Get the document base uri for the last import document to be resolved by this locator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSIFWSDLLocatorImpl

public WSIFWSDLLocatorImpl(java.lang.String ctxt,
                           java.lang.String wsdlURI,
                           java.lang.ClassLoader cl)
Create an instance of WSIFWSDLLocatorImpl.

Parameters:
ctxt - The context uri for the wsdl location
wsdlURI - The uri for the base wsdl document
cl - A ClassLoader to use in locating the base wsdl document and imports

WSIFWSDLLocatorImpl

public WSIFWSDLLocatorImpl(java.lang.String docBase,
                           java.io.Reader reader,
                           java.lang.ClassLoader cl)
Create an instance of WSIFWSDLLocatorImpl.

Parameters:
docBase - The uri for the base wsdl document
reader - A reader "directed at" the base wsdl document
cl - A ClassLoader to use in locating the base wsdl document and imports
Method Detail

getBaseInputSource

public org.xml.sax.InputSource getBaseInputSource()
Get an InputSource for the base wsdl document. Returns null if the document cannot be located.

Specified by:
getBaseInputSource in interface javax.wsdl.xml.WSDLLocator
Returns:
The InputSource or null if the import cannot be resolved

getImportInputSource

public org.xml.sax.InputSource getImportInputSource(java.lang.String base,
                                                    java.lang.String relativeLocation)
Get an InputSource for an imported wsdl document. Returns null if the import document cannot be located.

Specified by:
getImportInputSource in interface javax.wsdl.xml.WSDLLocator
Parameters:
base - The document base uri for the parent wsdl document
relativeLocation - The relative uri of the import wsdl document
Returns:
The InputSource or null if the import cannot be resolved

getBaseReader

public java.io.Reader getBaseReader()
Deprecated. Old WSDLLocator method, no longer on the interface


getImportReader

public java.io.Reader getImportReader(java.lang.String base,
                                      java.lang.String relativeLocation)
Deprecated. Old WSDLLocator method, no longer on the interface


getBaseURI

public java.lang.String getBaseURI()
Get the document base uri for the base wsdl document

Specified by:
getBaseURI in interface javax.wsdl.xml.WSDLLocator
Returns:
The document base uri

getLatestImportURI

public java.lang.String getLatestImportURI()
Get the document base uri for the last import document to be resolved by this locator. This is useful if resolving imports within imports.

Specified by:
getLatestImportURI in interface javax.wsdl.xml.WSDLLocator
Returns:
The document base uri

close

public void close()
           throws java.io.IOException
Close any Reader or stream objects that have been created

Specified by:
close in interface ClosableLocator
Throws:
java.io.IOException - If a call to close() on one of the Reader or stream objects fails


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.