org.apache.wsif.wsdl
Class WSIFWSDLLocatorImpl

java.lang.Object
  |
  +--org.apache.wsif.wsdl.WSIFWSDLLocatorImpl
All Implemented Interfaces:
javax.wsdl.xml.WSDLLocator

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

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.

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 objects that have been created
 java.io.Reader getBaseReader()
          Get a reader for the base wsdl document.
 java.lang.String getBaseURI()
          Get the document base uri for the base wsdl document
 java.io.Reader getImportReader(java.lang.String base, java.lang.String relativeLocation)
          Get a reader for an imported wsdl document.
 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

getBaseReader

public java.io.Reader getBaseReader()
Get a reader for the base wsdl document. Returns null if the document cannot be located.
Specified by:
getBaseReader in interface javax.wsdl.xml.WSDLLocator
Returns:
The reader or null if the import cannot be resolved

getImportReader

public java.io.Reader getImportReader(java.lang.String base,
                                      java.lang.String relativeLocation)
Get a reader for an imported wsdl document. Returns null if the import document cannot be located.
Specified by:
getImportReader 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 reader or null if the import cannot be resolved

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 objects that have been created
Throws:
java.io.IOException - If a call to close() on one of the Reader objects fails


Copyright © 2002, 2002 Apache XML Project. All Rights Reserved.