org.apache.woden.internal
Class DOMWSDLReader

java.lang.Object
  extended by org.apache.woden.internal.BaseWSDLReader
      extended by org.apache.woden.internal.DOMWSDLReader
All Implemented Interfaces:
WSDLReader

public class DOMWSDLReader
extends BaseWSDLReader

Implements the WSDLReader behaviour for DOM-based parsing.

Author:
John Kaputin (jkaputin@apache.org)

Field Summary
 
Fields inherited from class org.apache.woden.internal.BaseWSDLReader
features
 
Fields inherited from interface org.apache.woden.WSDLReader
FEATURE_CONTINUE_ON_ERROR, FEATURE_VALIDATION, FEATURE_VERBOSE, PROPERTY_TYPE_SYSTEM_API, PROPERTY_XML_PARSER_API, TYPE_XSD_2001
 
Constructor Summary
DOMWSDLReader()
           
 
Method Summary
 WSDLSource createWSDLSource()
          Returns a WSDLSource object that is compatible with the WSDLReader implementation.
protected  XMLElement createXMLElement(java.lang.Object elem)
          Returns an XMLElement object representing the specified element object.
protected  DescriptionElement getWSDLFromLocation(java.lang.String locationURI, DescriptionElement desc, java.util.Map wsdlModules)
           
protected  void parseExtensionAttributes(XMLElement extEl, java.lang.Class wsdlClass, WSDLElement wsdlObj, DescriptionElement desc)
           
protected  void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem)
           
protected  void parseSchemaForXMLSchema(DescriptionElement desc)
           
protected  Schema parseSchemaImport(XMLElement importEl, DescriptionElement desc)
           
protected  Schema parseSchemaInline(XMLElement schemaEl, DescriptionElement desc)
           
 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.
 
Methods inherited from class org.apache.woden.internal.BaseWSDLReader
getErrorReporter, getExtensionRegistry, getFactory, getFactoryImplName, getFeature, getProperty, getURI, getURIResolver, parseDescription, parseDocumentation, parseExtensionElement, resolveURI, resolveURI, setExtensionRegistry, setFactoryImplName, setFeature, setProperty, setURIResolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMWSDLReader

public DOMWSDLReader()
              throws WSDLException
Throws:
WSDLException
Method Detail

createWSDLSource

public WSDLSource createWSDLSource()
Description copied from interface: WSDLReader
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.

readWSDL

public Description readWSDL(java.lang.String wsdlURI)
                     throws WSDLException
Description copied from interface: WSDLReader
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

public Description readWSDL(java.lang.String wsdlURI,
                            ErrorHandler errorHandler)
                     throws WSDLException
Description copied from interface: WSDLReader
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

public Description readWSDL(WSDLSource wsdlSource)
                     throws WSDLException
Description copied from interface: WSDLReader
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

public Description readWSDL(WSDLSource wsdlSource,
                            ErrorHandler errorHandler)
                     throws WSDLException
Description copied from interface: WSDLReader
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

parseSchemaInline

protected Schema parseSchemaInline(XMLElement schemaEl,
                                   DescriptionElement desc)
                            throws WSDLException
Specified by:
parseSchemaInline in class BaseWSDLReader
Throws:
WSDLException

parseSchemaImport

protected Schema parseSchemaImport(XMLElement importEl,
                                   DescriptionElement desc)
                            throws WSDLException
Specified by:
parseSchemaImport in class BaseWSDLReader
Throws:
WSDLException

parseExtensionAttributes

protected void parseExtensionAttributes(XMLElement extEl,
                                        java.lang.Class wsdlClass,
                                        WSDLElement wsdlObj,
                                        DescriptionElement desc)
                                 throws WSDLException
Specified by:
parseExtensionAttributes in class BaseWSDLReader
Throws:
WSDLException

createXMLElement

protected XMLElement createXMLElement(java.lang.Object elem)
Description copied from class: BaseWSDLReader
Returns an XMLElement object representing the specified element object. The element object argument must be compatible with the concrete reader implementation. If so, this method returns an XMLElement object that is type-compatible with the reader implementatation (e.g. a DOMXMLElement for DOMWSDLReader).

Specified by:
createXMLElement in class BaseWSDLReader

parseNamespaceDeclarations

protected void parseNamespaceDeclarations(XMLElement xmlElem,
                                          WSDLElement wsdlElem)
                                   throws WSDLException
Specified by:
parseNamespaceDeclarations in class BaseWSDLReader
Throws:
WSDLException

parseSchemaForXMLSchema

protected void parseSchemaForXMLSchema(DescriptionElement desc)
Overrides:
parseSchemaForXMLSchema in class BaseWSDLReader

getWSDLFromLocation

protected DescriptionElement getWSDLFromLocation(java.lang.String locationURI,
                                                 DescriptionElement desc,
                                                 java.util.Map wsdlModules)
                                          throws WSDLException
Specified by:
getWSDLFromLocation in class BaseWSDLReader
Throws:
WSDLException


Copyright © 2007. All Rights Reserved.