com.ibm.wsdl

Class DefinitionImpl

public class DefinitionImpl extends AbstractWSDLElement implements Definition

This class represents a WSDL definition.

Author: Paul Fremantle Nirmal Mukhi Matthew J. Duftler

Field Summary
protected Mapbindings
protected StringdocumentBaseURI
protected ExtensionRegistryextReg
protected Mapimports
protected Mapmessages
protected QNamename
protected Mapnamespaces
protected ListnativeAttributeNames
protected MapportTypes
static longserialVersionUID
protected Mapservices
protected StringtargetNamespace
protected Typestypes
Method Summary
voidaddBinding(Binding binding)
Add a binding to this WSDL description.
voidaddImport(Import importDef)
Add an import to this WSDL description.
voidaddMessage(Message message)
Add a message to this WSDL description.
voidaddNamespace(String prefix, String namespaceURI)
This is a way to add a namespace association to a definition.
voidaddPortType(PortType portType)
Add a portType to this WSDL description.
voidaddService(Service service)
Add a service to this WSDL description.
BindingcreateBinding()
Create a new binding.
BindingFaultcreateBindingFault()
Create a new binding fault.
BindingInputcreateBindingInput()
Create a new binding input.
BindingOperationcreateBindingOperation()
Create a new binding operation.
BindingOutputcreateBindingOutput()
Create a new binding output.
FaultcreateFault()
Create a new fault.
ImportcreateImport()
Create a new import.
InputcreateInput()
Create a new input.
MessagecreateMessage()
Create a new message.
OperationcreateOperation()
Create a new operation.
OutputcreateOutput()
Create a new output.
PartcreatePart()
Create a new part.
PortcreatePort()
Create a new port.
PortTypecreatePortType()
Create a new port type.
ServicecreateService()
Create a new service.
TypescreateTypes()
Create a new types section.
MapgetAllBindings()
Get all the bindings defined in this Definition and those in any imported Definitions in the WSDL tree.
MapgetAllPortTypes()
Get all the portTypes defined in this Definition and those in any imported Definitions in the WSDL tree.
MapgetAllServices()
Get all the services defined in this Definition and those in any imported Definitions in the WSDL tree.
BindinggetBinding(QName name)
Get the specified binding.
MapgetBindings()
Get all the bindings defined in this Definition.
StringgetDocumentBaseURI()
Get the document base URI of this definition.
ExtensionRegistrygetExtensionRegistry()
Get a reference to the ExtensionRegistry for this Definition.
ListgetImports(String namespaceURI)
Get the list of imports for the specified namespaceURI.
MapgetImports()
Get a map of lists containing all the imports defined here.
MessagegetMessage(QName name)
Get the specified message.
MapgetMessages()
Get all the messages defined here.
StringgetNamespace(String prefix)
Get the namespace URI associated with this prefix.
MapgetNamespaces()
Get all namespace associations in this definition.
ListgetNativeAttributeNames()
Get the list of local attribute names defined for this element in the WSDL specification.
PortTypegetPortType(QName name)
Get the specified portType.
MapgetPortTypes()
Get all the portTypes defined in this Definition.
StringgetPrefix(String namespaceURI)
Get a prefix associated with this namespace URI.
QNamegetQName()
Get the name of this definition.
ServicegetService(QName name)
Get the specified service.
MapgetServices()
Get all the services defined in this Definition.
StringgetTargetNamespace()
Get the target namespace in which the WSDL elements are defined.
TypesgetTypes()
Get the types section.
BindingremoveBinding(QName name)
Remove the specified binding from this definition.
ImportremoveImport(Import importDef)
Remove an import from this WSDL description.
MessageremoveMessage(QName name)
Remove the specified message from this definition.
StringremoveNamespace(String prefix)
Remove the namespace URI associated with this prefix.
PortTyperemovePortType(QName name)
Remove the specified portType from this definition.
ServiceremoveService(QName name)
Remove the specified service from this definition.
voidsetDocumentBaseURI(String documentBaseURI)
Set the document base URI of this definition.
voidsetExtensionRegistry(ExtensionRegistry extReg)
Set the ExtensionRegistry for this Definition.
voidsetQName(QName name)
Set the name of this definition.
voidsetTargetNamespace(String targetNamespace)
Set the target namespace in which WSDL elements are defined.
voidsetTypes(Types types)
Set the types section.
StringtoString()

Field Detail

bindings

protected Map bindings

documentBaseURI

protected String documentBaseURI

extReg

protected ExtensionRegistry extReg

imports

protected Map imports

messages

protected Map messages

name

protected QName name

namespaces

protected Map namespaces

nativeAttributeNames

protected List nativeAttributeNames

portTypes

protected Map portTypes

serialVersionUID

public static final long serialVersionUID

services

protected Map services

targetNamespace

protected String targetNamespace

types

protected Types types

Method Detail

addBinding

public void addBinding(Binding binding)
Add a binding to this WSDL description.

Parameters: binding the binding to be added

addImport

public void addImport(Import importDef)
Add an import to this WSDL description.

Parameters: importDef the import to be added

addMessage

public void addMessage(Message message)
Add a message to this WSDL description.

Parameters: message the message to be added

addNamespace

public void addNamespace(String prefix, String namespaceURI)
This is a way to add a namespace association to a definition. It is similar to adding a namespace prefix declaration to the top of a <wsdl:definition> element. This has nothing to do with the <wsdl:import> element; there are separate methods for dealing with information described by <wsdl:import> elements.

Parameters: prefix the prefix to use for this namespace (when rendering this information as XML). Use null or an empty string to describe the default namespace (i.e. xmlns="..."). namespaceURI the namespace URI to associate the prefix with. If you use null, the namespace association will be removed.

addPortType

public void addPortType(PortType portType)
Add a portType to this WSDL description.

Parameters: portType the portType to be added

addService

public void addService(Service service)
Add a service to this WSDL description.

Parameters: service the service to be added

createBinding

public Binding createBinding()
Create a new binding.

Returns: the newly created binding

createBindingFault

public BindingFault createBindingFault()
Create a new binding fault.

Returns: the newly created binding fault

createBindingInput

public BindingInput createBindingInput()
Create a new binding input.

Returns: the newly created binding input

createBindingOperation

public BindingOperation createBindingOperation()
Create a new binding operation.

Returns: the newly created binding operation

createBindingOutput

public BindingOutput createBindingOutput()
Create a new binding output.

Returns: the newly created binding output

createFault

public Fault createFault()
Create a new fault.

Returns: the newly created fault

createImport

public Import createImport()
Create a new import.

Returns: the newly created import

createInput

public Input createInput()
Create a new input.

Returns: the newly created input

createMessage

public Message createMessage()
Create a new message.

Returns: the newly created message

createOperation

public Operation createOperation()
Create a new operation.

Returns: the newly created operation

createOutput

public Output createOutput()
Create a new output.

Returns: the newly created output

createPart

public Part createPart()
Create a new part.

Returns: the newly created part

createPort

public Port createPort()
Create a new port.

Returns: the newly created port

createPortType

public PortType createPortType()
Create a new port type.

Returns: the newly created port type

createService

public Service createService()
Create a new service.

Returns: the newly created service

createTypes

public Types createTypes()
Create a new types section.

Returns: the newly created types section

getAllBindings

public Map getAllBindings()
Get all the bindings defined in this Definition and those in any imported Definitions in the WSDL tree.

getAllPortTypes

public Map getAllPortTypes()
Get all the portTypes defined in this Definition and those in any imported Definitions in the WSDL tree.

getAllServices

public Map getAllServices()
Get all the services defined in this Definition and those in any imported Definitions in the WSDL tree.

getBinding

public Binding getBinding(QName name)
Get the specified binding. Also checks imported documents.

Parameters: name the name of the desired binding.

Returns: the corresponding binding, or null if there wasn't any matching binding

getBindings

public Map getBindings()
Get all the bindings defined in this Definition.

getDocumentBaseURI

public String getDocumentBaseURI()
Get the document base URI of this definition.

Returns: the document base URI

getExtensionRegistry

public ExtensionRegistry getExtensionRegistry()
Get a reference to the ExtensionRegistry for this Definition.

getImports

public List getImports(String namespaceURI)
Get the list of imports for the specified namespaceURI.

Parameters: namespaceURI the namespaceURI associated with the desired imports.

Returns: a list of the corresponding imports, or null if there weren't any matching imports

getImports

public Map getImports()
Get a map of lists containing all the imports defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each namespaceURI for which imports have been defined.

getMessage

public Message getMessage(QName name)
Get the specified message. Also checks imported documents.

Parameters: name the name of the desired message.

Returns: the corresponding message, or null if there wasn't any matching message

getMessages

public Map getMessages()
Get all the messages defined here.

getNamespace

public String getNamespace(String prefix)
Get the namespace URI associated with this prefix. Or null if there is no namespace URI associated with this prefix. This is unrelated to the <wsdl:import> element.

See Also: DefinitionImpl getPrefix

getNamespaces

public Map getNamespaces()
Get all namespace associations in this definition. The keys are the prefixes, and the namespace URIs are the values. This is unrelated to the <wsdl:import> element.

See Also: DefinitionImpl

getNativeAttributeNames

public List getNativeAttributeNames()
Get the list of local attribute names defined for this element in the WSDL specification.

Returns: a List of Strings, one for each local attribute name

getPortType

public PortType getPortType(QName name)
Get the specified portType. Also checks imported documents.

Parameters: name the name of the desired portType.

Returns: the corresponding portType, or null if there wasn't any matching portType

getPortTypes

public Map getPortTypes()
Get all the portTypes defined in this Definition.

getPrefix

public String getPrefix(String namespaceURI)
Get a prefix associated with this namespace URI. Or null if there are no prefixes associated with this namespace URI. This is unrelated to the <wsdl:import> element.

See Also: DefinitionImpl getNamespace

getQName

public QName getQName()
Get the name of this definition.

Returns: the definition name

getService

public Service getService(QName name)
Get the specified service. Also checks imported documents.

Parameters: name the name of the desired service.

Returns: the corresponding service, or null if there wasn't any matching service

getServices

public Map getServices()
Get all the services defined in this Definition.

getTargetNamespace

public String getTargetNamespace()
Get the target namespace in which the WSDL elements are defined.

Returns: the target namespace

getTypes

public Types getTypes()
Get the types section.

Returns: the types section

removeBinding

public Binding removeBinding(QName name)
Remove the specified binding from this definition.

Parameters: name the name of the binding to remove

Returns: the binding previously associated with this qname, if there was one; may return null

removeImport

public Import removeImport(Import importDef)
Remove an import from this WSDL description.

Parameters: importDef the import to be removed

removeMessage

public Message removeMessage(QName name)
Remove the specified message from this definition.

Parameters: name the name of the message to remove

Returns: the message previously associated with this qname, if there was one; may return null

removeNamespace

public String removeNamespace(String prefix)
Remove the namespace URI associated with this prefix.

Parameters: prefix the prefix of the namespace to be removed.

Returns: the namespace URI which was removed

removePortType

public PortType removePortType(QName name)
Remove the specified portType from this definition.

Parameters: name the name of the portType to remove

Returns: the portType previously associated with this qname, if there was one; may return null

removeService

public Service removeService(QName name)
Remove the specified service from this definition.

Parameters: name the name of the service to remove

Returns: the service previously associated with this qname, if there was one; may return null

setDocumentBaseURI

public void setDocumentBaseURI(String documentBaseURI)
Set the document base URI of this definition. Can be used to represent the origin of the Definition, and can be exploited when resolving relative URIs (e.g. in <import>s).

Parameters: documentBaseURI the document base URI of this definition

setExtensionRegistry

public void setExtensionRegistry(ExtensionRegistry extReg)
Set the ExtensionRegistry for this Definition.

setQName

public void setQName(QName name)
Set the name of this definition.

Parameters: name the desired name

setTargetNamespace

public void setTargetNamespace(String targetNamespace)
Set the target namespace in which WSDL elements are defined.

Parameters: targetNamespace the target namespace

setTypes

public void setTypes(Types types)
Set the types section.

toString

public String toString()
Copyright B) 2003,2006 IBM. All Rights Reserved.