org.apache.woden
Interface WSDLReader

All Known Implementing Classes:
BaseWSDLReader, DOMWSDLReader, OMWSDLReader, WrappingReader

public interface WSDLReader

This interface declares an API for reading WSDL descriptions from different sources such as WSDL documents or files, parsed XML elements and input byte streams. It contains various readWSDL methods that obtain the WSDL infoset from the specified source, parse it into the Woden object model and return this as a WSDL Description component containing the WSDL components derived from that infoset. If the WSDL is comprised of a composite set of documents nested via wsdl:import or wsdl:include, the Description component will represent the abstract, 'flattened' view of the WSDL tree, containing all of the WSDL components derived from the various WSDL documents, but without the document structure.

Author:
John Kaputin (jkaputin@apache.org)

Field Summary
static java.lang.String FEATURE_CONTINUE_ON_ERROR
          Set to true if parsing should continue after encountering a non-fatal error in the WSDL which might result in incomplete WSDL model being returned by the reader, false otherwise.
static java.lang.String FEATURE_VALIDATION
          Set to true to enable the WSDL validation feature, false otherwise.
static java.lang.String FEATURE_VERBOSE
          Set to true to enable verbose diagnostic tracing, false otherwise.
static java.lang.String PROPERTY_TYPE_SYSTEM_API
           
static java.lang.String PROPERTY_XML_PARSER_API
          Constants for reader configuration property names.
static java.lang.String TYPE_XSD_2001
          A constant representing the W3C XML Schema type system.
 
Method Summary
 WSDLSource createWSDLSource()
          Returns a WSDLSource object that is compatible with the WSDLReader implementation.
 ErrorReporter getErrorReporter()
           
 ExtensionRegistry getExtensionRegistry()
           
 java.lang.String getFactoryImplName()
           
 boolean getFeature(java.lang.String name)
          Returns the on/off setting of the named feature, represented as a boolean.
 java.lang.Object getProperty(java.lang.String name)
          Returns the value of the named property.
 URIResolver getURIResolver()
          Gets the URI Resolver currently in use
 Description readWSDL(java.lang.String wsdlURI)
          Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
 Description readWSDL(java.lang.String wsdlURI, ErrorHandler errorHandler)
          Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
 Description readWSDL(WSDLSource wsdlSource)
          Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.
 Description readWSDL(WSDLSource wsdlSource, ErrorHandler errorHandler)
          Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.
 void setExtensionRegistry(ExtensionRegistry extReg)
           
 void setFactoryImplName(java.lang.String factoryImplName)
          Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests.
 void setFeature(java.lang.String name, boolean value)
          Set a named feature on or off with a boolean.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set a named property to the specified object.
 void setURIResolver(URIResolver resolver)
          Sets the URI resolver to be used.
 

Field Detail

FEATURE_VERBOSE

static final java.lang.String FEATURE_VERBOSE
Set to true to enable verbose diagnostic tracing, false otherwise.

See Also:
Constant Field Values

FEATURE_VALIDATION

static final java.lang.String FEATURE_VALIDATION
Set to true to enable the WSDL validation feature, false otherwise.

See Also:
Constant Field Values

FEATURE_CONTINUE_ON_ERROR

static final java.lang.String FEATURE_CONTINUE_ON_ERROR
Set to true if parsing should continue after encountering a non-fatal error in the WSDL which might result in incomplete WSDL model being returned by the reader, false otherwise.

See Also:
Constant Field Values

PROPERTY_XML_PARSER_API

static final java.lang.String PROPERTY_XML_PARSER_API
Constants for reader configuration property names. Properties have a value represented by an object. TODO ditto the comment on features, about whether to define property constants here and use generic set/getProperty methods or remove the constants and use property-specific methods.

See Also:
Constant Field Values

PROPERTY_TYPE_SYSTEM_API

static final java.lang.String PROPERTY_TYPE_SYSTEM_API
See Also:
Constant Field Values

TYPE_XSD_2001

static final java.lang.String TYPE_XSD_2001
A constant representing the W3C XML Schema type system. All implementations of the Woden API must support W3C XML Schema. An implementation configured to use this type system can use this constant to specify its value for the property "http://ws.apache.org/woden/property/type_system_api".

See Also:
Constant Field Values
Method Detail

readWSDL

Description readWSDL(java.lang.String wsdlURI)
                     throws WSDLException
Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.

Parameters:
wsdlURI - a URI (absolute filename or URL) pointing to a WSDL document.
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as wrapper for checked exceptions.

readWSDL

Description readWSDL(java.lang.String wsdlURI,
                     ErrorHandler errorHandler)
                     throws WSDLException
Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document. Use the specified custom error handler rather than the Woden default handler to handle any WSDL parsing or validation error messages.

Parameters:
wsdlURI - a URI (absolute filename or URL) pointing to a WSDL document.
errorHandler - An error handler that will handle reporting of errors and warnings.
Returns:
the Description component.
Throws:
WSDLException - for terminating errors and as wrapper for checked exceptions.

readWSDL

Description readWSDL(WSDLSource wsdlSource)
                     throws WSDLException
Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.

The WSDLSource object must represent the WSDL using a type that the WSDLReader implementation can understand. That is, the WSDLSource and WSDLReader implementations must be compatible. For example, a DOM-based WSDLReader implementation will likely require the WSDLSource object to represent the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

Parameters:
wsdlSource - contains an object representing the WSDL
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as a wrapper for checked exceptions

readWSDL

Description readWSDL(WSDLSource wsdlSource,
                     ErrorHandler errorHandler)
                     throws WSDLException
Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source. Use the specified custom error handler rather than the Woden default handler to handle any WSDL parsing or validation error messages.

The WSDLSource object must represent the WSDL using a type that the WSDLReader implementation can understand. That is, the WSDLSource and WSDLReader implementations must be compatible. For example, a DOM-based WSDLReader implementation will likely require the WSDLSource object to represent the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

Parameters:
wsdlSource - contains an object representing the WSDL
errorHandler - a custom error handler that overrides the default handler
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as a wrapper for checked exceptions

createWSDLSource

WSDLSource createWSDLSource()
Returns a WSDLSource object that is compatible with the WSDLReader implementation. That is, a WSDLSource implementation that represents WSDL using types that the WSDLReader implementation can understand. For example, DOM-based WSDLReader implementation will likely return a WSDLSource object that represents the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

This WSDLSource object can be used to encapsulate the WSDL and is then passed to the WSDLReader as a parameter to its readWSDL methods.

Returns:
the WSDLSource class compatible with the WSDLReader implementation.

getErrorReporter

ErrorReporter getErrorReporter()
Returns:
the ErrorReporter used by this reader

setFactoryImplName

void setFactoryImplName(java.lang.String factoryImplName)
Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests. The named factory class will replace any existing factory object in use.

Parameters:
factoryImplName - the WSDLFactory implementation classname

getFactoryImplName

java.lang.String getFactoryImplName()
Returns:
the WSDLFactory implementation classname

setExtensionRegistry

void setExtensionRegistry(ExtensionRegistry extReg)

getExtensionRegistry

ExtensionRegistry getExtensionRegistry()

setFeature

void setFeature(java.lang.String name,
                boolean value)
Set a named feature on or off with a boolean. Note, this relates to features of the Woden framework, not to WSDL-specific features such as the WSDL 2.0 Feature component.

All feature names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for features defined by the Woden implementation. Features specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.featureName

Parameters:
name - the name of the feature to be set
value - a boolean value where true sets the feature on, false sets it off
Throws:
java.lang.IllegalArgumentException - if the feature name is not recognized.

getFeature

boolean getFeature(java.lang.String name)
Returns the on/off setting of the named feature, represented as a boolean.

Parameters:
name - the name of the feature to get the value of
Returns:
a boolean representing the on/off state of the named feature
Throws:
java.lang.IllegalArgumentException - if the feature name is not recognized.

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object value)
Set a named property to the specified object. Note, this relates to properties of the Woden implementation, not to WSDL-specific properties such as the WSDL 2.0 Property component.

All property names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for properties defined by the Woden implementation. Properties specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.propertyName

Parameters:
name - the name of the property to be set
value - an Object representing the value to set the property to
Throws:
java.lang.IllegalArgumentException - if the property name is not recognized.

getProperty

java.lang.Object getProperty(java.lang.String name)
Returns the value of the named property.

Parameters:
name - the name of the property to get the value of
Returns:
an Object representing the property's value
Throws:
java.lang.IllegalArgumentException - if the property name is not recognized.

setURIResolver

void setURIResolver(URIResolver resolver)
Sets the URI resolver to be used.

Parameters:
resolver -

getURIResolver

URIResolver getURIResolver()
Gets the URI Resolver currently in use

Returns:
the URI resolver currently in use


Copyright © 2007. All Rights Reserved.