com.ibm.wsdl

Class PortTypeImpl

Implemented Interfaces:
AttributeExtensible, ElementExtensible, PortType, java.io.Serializable, WSDLElement

public class PortTypeImpl
extends AbstractWSDLElement
implements PortType

This class represents a port type. It contains information about operations associated with this port type.
Authors:
Paul Fremantle
Nirmal Mukhi
Matthew J. Duftler

Field Summary

protected boolean
isUndefined
protected QName
name
protected List
nativeAttributeNames
protected List
operations
static long
serialVersionUID

Fields inherited from class com.ibm.wsdl.AbstractWSDLElement

docEl, extElements, extensionAttributes

Fields inherited from interface javax.wsdl.extensions.AttributeExtensible

LIST_OF_QNAMES_TYPE, LIST_OF_STRINGS_TYPE, NO_DECLARED_TYPE, QNAME_TYPE, STRING_TYPE

Method Summary

void
addOperation(Operation operation)
Add an operation to this port type.
List
getNativeAttributeNames()
Get the list of local attribute names defined for this element in the WSDL specification.
Operation
getOperation(String name, String inputName, String outputName)
Get the specified operation.
List
getOperations()
Get all the operations defined here.
QName
getQName()
Get the name of this port type.
boolean
isUndefined()
Operation
removeOperation(String name, String inputName, String outputName)
Remove the specified operation.
void
setQName(QName name)
Set the name of this port type.
void
setUndefined(boolean isUndefined)
String
toString()

Methods inherited from class com.ibm.wsdl.AbstractWSDLElement

addExtensibilityElement, getDocumentationElement, getExtensibilityElements, getExtensionAttribute, getExtensionAttributes, removeExtensibilityElement, setDocumentationElement, setExtensionAttribute, toString

Field Details

isUndefined

protected boolean isUndefined

name

protected QName name

nativeAttributeNames

protected List nativeAttributeNames

operations

protected List operations

serialVersionUID

public static final long serialVersionUID
Field Value:
1L

Method Details

addOperation

public void addOperation(Operation operation)
Add an operation to this port type.
Specified by:
addOperation in interface PortType
Parameters:
operation - the operation to be added

getNativeAttributeNames

public List getNativeAttributeNames()
Get the list of local attribute names defined for this element in the WSDL specification.
Specified by:
getNativeAttributeNames in interface AttributeExtensible
Returns:
a List of Strings, one for each local attribute name

getOperation

public Operation getOperation(String name,
                              String inputName,
                              String outputName)
Get the specified operation. Note that operation names can be overloaded within a PortType. In case of overloading, the names of the input and output messages can be used to further refine the search.

The search criteria will be the operation name parameter and any non-null input or output message name parameters. To exclude the input or output message name from the search criteria, specify a null value for the input or output message name parameter. To search for operations with unnamed input or output messages (i.e. <input> or <output> elements with the 'name' attribute omitted), specify the string ":none" for the input or output message name parameter.

Note: the use of a string value ":none" rather than null to search for unnamed input or output messages is necessary to retain backward compatibility with earlier versions of the JWSDL API, which defined a null value to mean 'ignore this parameter'. The colon in ":none" is to avoid name clashes with input or output message names, which must be of type NCName (i.e. they cannot contain colons).

Specified by:
getOperation in interface PortType
Parameters:
name - the name of the desired operation.
inputName - the name of the input message; if this is null it will be ignored, if this is ":none" it means search for an input message without a name.
outputName - the name of the output message; if this is null it will be ignored, if this is ":none" it means search for an output message without a name.
Returns:
the corresponding operation, or null if there wasn't any matching operation

getOperations

public List getOperations()
Get all the operations defined here.
Specified by:
getOperations in interface PortType

getQName

public QName getQName()
Get the name of this port type.
Specified by:
getQName in interface PortType
Returns:
the port type name

isUndefined

public boolean isUndefined()
Specified by:
isUndefined in interface PortType

removeOperation

public Operation removeOperation(String name,
                                 String inputName,
                                 String outputName)
Remove the specified operation. Note that operation names can be overloaded within a PortType. In case of overloading, the names of the input and output messages can be used to further refine the search.

Usage of the input and output message name parameters is as described for the getOperation method.

Specified by:
removeOperation in interface PortType
Parameters:
name - the name of the desired operation.
inputName - the name of the input message; if this is null it will be ignored, if this is ":none" it means search for an input message without a name.
outputName - the name of the output message; if this is null it will be ignored, if this is ":none" it means search for an output message without a name.
Returns:
the operation which was removed, or null if there wasn't any matching operation

setQName

public void setQName(QName name)
Set the name of this port type.
Specified by:
setQName in interface PortType
Parameters:
name - the desired name

setUndefined

public void setUndefined(boolean isUndefined)
Specified by:
setUndefined in interface PortType

toString

public String toString()
Overrides:
toString in interface AbstractWSDLElement

Copyright B) 2003,2006 IBM. All Rights Reserved.