org.apache.woden
Interface WSDLSource

All Known Implementing Classes:
BaseWSDLSource, DOMWSDLSource

public interface WSDLSource

This interface represents WSDL source in a format to be interpreted by the WSDLReader implementation. It permits WSDL source in various forms to be passed to the WSDLReader without making the WSDLReader API dependent on any particular XML parser or XML object model.

Each concrete implementation of WSDLReader will have a concrete implementation of WSDLSource that can handle the types of WSDL source formats that are compatible with the WSDLReader implementation. For example, a DOM-based implementation of WSDLReader will return a DOM-based implementation of WSDLSource via its WSDLReader.createWSDLSource method and this DOM-based WSDLSource implemenation will accept as WSDL source an org.w3c.dom.Element or org.w3c.dom.Document object via its WSDLSource.setSource method.

The WSDL source is set via the setSource(java.lang.Object) method. Runtime type safety should be provided in the implementation of the setSource method, which should check that the Object argument is of a type compatible with the WSDLReader implementation that created the WSDLSource object.

Programming example:

   //wsdlURI is the URI of the base wsdl document.
   //domReader is a DOM-based implementation of WSDLReader
   //domElement is an org.w3c.dom.Element representing a <wsdl:description> element.
 
   WSDLSource wsdlSource = domReader.createWSDLSource();
   wsdlSource.setBaseURI(wsdlURI);
   wsdlSource.setSource(domElement);
   DescriptionElement desc = reader.readWSDL(wsdlSource);
 

Author:
John Kaputin (jkaputin@apache.org)

Method Summary
 java.net.URI getBaseURI()
           
 java.lang.Object getSource()
          Returns the implementation specific object representing the WSDL source (for example, a DOM Element or Document or an Axiom OMElement).
 void setBaseURI(java.net.URI baseURI)
          Store the base URI of the WSDL source document.
 void setSource(java.lang.Object wsdlSource)
          Store the specified source object representing the WSDL.
 

Method Detail

setSource

void setSource(java.lang.Object wsdlSource)
Store the specified source object representing the WSDL.

Parameters:
wsdlSource - the WSDL source object
Throws:
java.lang.IllegalArgumentException - if the specified object type is not recognized by the WSDLSource implementation.

getSource

java.lang.Object getSource()
Returns the implementation specific object representing the WSDL source (for example, a DOM Element or Document or an Axiom OMElement). The caller should cast this object to the appropriate type to use its interface.

Returns:
the Object representing the WSDL source

setBaseURI

void setBaseURI(java.net.URI baseURI)
Store the base URI of the WSDL source document.

Parameters:
baseURI - the URI of the WSDL document.

getBaseURI

java.net.URI getBaseURI()
Returns:
the base URI of the WSDL


Copyright © 2007. All Rights Reserved.