com.ibm.wsdl.xml

Class WSDLReaderImpl

public class WSDLReaderImpl extends Object implements WSDLReader

This class describes a collection of methods that enable conversion of a WSDL document (in XML, following the WSDL schema described in the WSDL specification) into a WSDL model.

Author: Matthew J. Duftler Nirmal Mukhi

Field Summary
protected MapallSchemas
protected ExtensionRegistryextReg
protected WSDLFactoryfactory
protected StringfactoryImplName
protected booleanimportDocuments
protected WSDLLocatorloc
protected booleanverbose
Method Summary
ExtensionRegistrygetExtensionRegistry()
Get the extension registry, if one was set.
StringgetFactoryImplName()
Get the factoryImplName, if one was set.
booleangetFeature(String name)
Gets the value of the specified feature.
protected WSDLFactorygetWSDLFactory()
Get the WSDLFactory object cached in the reader, or use lazy instantiation if it is not cached yet.
protected BindingparseBinding(Element bindingEl, Definition def)
protected BindingFaultparseBindingFault(Element bindingFaultEl, Definition def)
protected BindingInputparseBindingInput(Element bindingInputEl, Definition def)
protected BindingOperationparseBindingOperation(Element bindingOperationEl, PortType portType, Definition def)
protected BindingOutputparseBindingOutput(Element bindingOutputEl, Definition def)
protected DefinitionparseDefinitions(String documentBaseURI, Element defEl, Map importedDefs)
protected ObjectparseExtensibilityAttribute(Element el, int attrType, String attrValue, Definition def)
protected voidparseExtensibilityAttributes(Element el, Class parentType, AttributeExtensible attrExt, Definition def)
protected ExtensibilityElementparseExtensibilityElement(Class parentType, Element el, Definition def)
protected FaultparseFault(Element faultEl, Definition def)
protected ImportparseImport(Element importEl, Definition def, Map importedDefs)
protected InputparseInput(Element inputEl, Definition def)
protected MessageparseMessage(Element msgEl, Definition def)
protected OperationparseOperation(Element opEl, PortType portType, Definition def)
protected OutputparseOutput(Element outputEl, Definition def)
protected PartparsePart(Element partEl, Definition def)
protected PortparsePort(Element portEl, Definition def)
protected PortTypeparsePortType(Element portTypeEl, Definition def)
protected ExtensibilityElementparseSchema(Class parentType, Element el, Definition def)
protected ExtensibilityElementparseSchema(Class parentType, Element el, Definition def, ExtensionRegistry extReg)
protected ServiceparseService(Element serviceEl, Definition def)
protected TypesparseTypes(Element typesEl, Definition def)
DefinitionreadWSDL(String wsdlURI)
Read the WSDL document accessible via the specified URI into a WSDL definition.
DefinitionreadWSDL(String contextURI, String wsdlURI)
Read the WSDL document accessible via the specified URI into a WSDL definition.
DefinitionreadWSDL(String documentBaseURI, Element definitionsElement)
Read the specified <wsdl:definitions> element into a WSDL definition.
protected DefinitionreadWSDL(String documentBaseURI, Element definitionsElement, Map importedDefs)
DefinitionreadWSDL(String documentBaseURI, Document wsdlDocument)
Read the specified WSDL document into a WSDL definition.
DefinitionreadWSDL(String documentBaseURI, InputSource inputSource)
Read a WSDL document into a WSDL definition.
DefinitionreadWSDL(WSDLLocator locator)
Read a WSDL document into a WSDL definition.
voidsetExtensionRegistry(ExtensionRegistry extReg)
Set the extension registry to be used when reading WSDL documents into a WSDL definition.
voidsetFactoryImplName(String factoryImplName)
Set a different factory implementation to use for creating definitions when reading WSDL documents.
voidsetFeature(String name, boolean value)
Sets the specified feature to the specified value.

Field Detail

allSchemas

protected Map allSchemas

extReg

protected ExtensionRegistry extReg

factory

protected WSDLFactory factory

factoryImplName

protected String factoryImplName

importDocuments

protected boolean importDocuments

loc

protected WSDLLocator loc

verbose

protected boolean verbose

Method Detail

getExtensionRegistry

public ExtensionRegistry getExtensionRegistry()
Get the extension registry, if one was set. Default is null.

getFactoryImplName

public String getFactoryImplName()
Get the factoryImplName, if one was set. Default is null.

getFeature

public boolean getFeature(String name)
Gets the value of the specified feature.

Parameters: name the name of the feature to get the value of.

Throws: IllegalArgumentException if the feature name is not recognized.

See Also: WSDLReaderImpl

getWSDLFactory

protected WSDLFactory getWSDLFactory()
Get the WSDLFactory object cached in the reader, or use lazy instantiation if it is not cached yet.

parseBinding

protected Binding parseBinding(Element bindingEl, Definition def)

parseBindingFault

protected BindingFault parseBindingFault(Element bindingFaultEl, Definition def)

parseBindingInput

protected BindingInput parseBindingInput(Element bindingInputEl, Definition def)

parseBindingOperation

protected BindingOperation parseBindingOperation(Element bindingOperationEl, PortType portType, Definition def)

parseBindingOutput

protected BindingOutput parseBindingOutput(Element bindingOutputEl, Definition def)

parseDefinitions

protected Definition parseDefinitions(String documentBaseURI, Element defEl, Map importedDefs)

parseExtensibilityAttribute

protected Object parseExtensibilityAttribute(Element el, int attrType, String attrValue, Definition def)

parseExtensibilityAttributes

protected void parseExtensibilityAttributes(Element el, Class parentType, AttributeExtensible attrExt, Definition def)

parseExtensibilityElement

protected ExtensibilityElement parseExtensibilityElement(Class parentType, Element el, Definition def)

parseFault

protected Fault parseFault(Element faultEl, Definition def)

parseImport

protected Import parseImport(Element importEl, Definition def, Map importedDefs)

parseInput

protected Input parseInput(Element inputEl, Definition def)

parseMessage

protected Message parseMessage(Element msgEl, Definition def)

parseOperation

protected Operation parseOperation(Element opEl, PortType portType, Definition def)

parseOutput

protected Output parseOutput(Element outputEl, Definition def)

parsePart

protected Part parsePart(Element partEl, Definition def)

parsePort

protected Port parsePort(Element portEl, Definition def)

parsePortType

protected PortType parsePortType(Element portTypeEl, Definition def)

parseSchema

protected ExtensibilityElement parseSchema(Class parentType, Element el, Definition def)

parseSchema

protected ExtensibilityElement parseSchema(Class parentType, Element el, Definition def, ExtensionRegistry extReg)

parseService

protected Service parseService(Element serviceEl, Definition def)

parseTypes

protected Types parseTypes(Element typesEl, Definition def)

readWSDL

public Definition readWSDL(String wsdlURI)
Read the WSDL document accessible via the specified URI into a WSDL definition.

Parameters: wsdlURI a URI (can be a filename or URL) pointing to a WSDL XML definition.

Returns: the definition.

readWSDL

public Definition readWSDL(String contextURI, String wsdlURI)
Read the WSDL document accessible via the specified URI into a WSDL definition.

Parameters: contextURI the context in which to resolve the wsdlURI, if the wsdlURI is relative. Can be null, in which case it will be ignored. wsdlURI a URI (can be a filename or URL) pointing to a WSDL XML definition.

Returns: the definition.

readWSDL

public Definition readWSDL(String documentBaseURI, Element definitionsElement)
Read the specified <wsdl:definitions> element into a WSDL definition.

Parameters: documentBaseURI the document base URI of the WSDL definition described by the element. Will be set as the documentBaseURI of the returned Definition. Can be null, in which case it will be ignored. definitionsElement the <wsdl:definitions> element

Returns: the definition described by the element.

readWSDL

protected Definition readWSDL(String documentBaseURI, Element definitionsElement, Map importedDefs)

readWSDL

public Definition readWSDL(String documentBaseURI, Document wsdlDocument)
Read the specified WSDL document into a WSDL definition.

Parameters: documentBaseURI the document base URI of the WSDL definition described by the document. Will be set as the documentBaseURI of the returned Definition. Can be null, in which case it will be ignored. wsdlDocument the WSDL document, an XML document obeying the WSDL schema.

Returns: the definition described in the document.

readWSDL

public Definition readWSDL(String documentBaseURI, InputSource inputSource)
Read a WSDL document into a WSDL definition.

Parameters: documentBaseURI the document base URI of the WSDL definition described by the document. Will be set as the documentBaseURI of the returned Definition. Can be null, in which case it will be ignored. inputSource an InputSource pointing to the WSDL document, an XML document obeying the WSDL schema.

Returns: the definition described in the document pointed to by the InputSource.

readWSDL

public Definition readWSDL(WSDLLocator locator)
Read a WSDL document into a WSDL definition.

Parameters: locator A WSDLLocator object used to provide InputSources pointing to the wsdl file.

Returns: the definition described in the document

setExtensionRegistry

public void setExtensionRegistry(ExtensionRegistry extReg)
Set the extension registry to be used when reading WSDL documents into a WSDL definition. If an extension registry is set, that is the extension registry that will be set as the extensionRegistry property of the definitions resulting from invoking readWSDL(...). Default is null.

Parameters: extReg the extension registry to use for new definitions

setFactoryImplName

public void setFactoryImplName(String factoryImplName)
Set a different factory implementation to use for creating definitions when reading WSDL documents. As some WSDLReader implementations may only be capable of creating definitions using the same factory implementation from which the reader was obtained, this method is optional. Default is null.

Parameters: factoryImplName the fully-qualified class name of the class which provides a concrete implementation of the abstract class WSDLFactory.

Throws: UnsupportedOperationException if this method is invoked on an implementation which does not support it.

setFeature

public void setFeature(String name, boolean value)
Sets the specified feature to the specified value.

The supported features are:

Name Description Default Value
javax.wsdl.verbose
If set to true, status messages will be displayed.
true
javax.wsdl.importDocuments
If set to true, imported WSDL documents will be retrieved and processed.
true

All feature names must be fully-qualified, Java package style. All names starting with javax.wsdl. are reserved for features defined by the JWSDL specification. It is recommended that implementation- specific features be fully-qualified to match the package name of that implementation. For example: com.abc.featureName

Parameters: name the name of the feature to be set. value the value to set the feature to.

Throws: IllegalArgumentException if the feature name is not recognized.

See Also: getFeature

Copyright © 2003,2005 IBM. All Rights Reserved.