org.ws4d.java.wsdl
Class WSDLPortType

java.lang.Object
  extended by org.ws4d.java.wsdl.NamedItem
      extended by org.ws4d.java.wsdl.WSDLPortType
All Implemented Interfaces:
Attributable

public class WSDLPortType
extends NamedItem
implements Attributable

Implementation of the WSDL 1.1 Port Types.
WSDL 1.1, 2.4 Port Types


Field Summary
static java.lang.String SUFFIX
           
 
Constructor Summary
WSDLPortType()
           
WSDLPortType(QName name)
           
 
Method Summary
 void addOperation(WSDLOperation operation)
           
 CustomAttributeValue getAttribute(QName name)
          Returns the value of the attribute with the given name or null, if this attribute is not available (or if its value is actually explicitly set to null).
 HashMap getAttributes()
          Returns all attributes explicitly set for this Attributable instance.
 WSDLOperation getOperation(java.lang.String name, java.lang.String inputName, java.lang.String outputName)
           
 DataStructure getOperations()
           
 WSDL getWsdl()
           
 boolean hasAttributes()
          Returns true only if this instance has at least one attribute set.
 boolean isEventSource()
           
 void serializeAttributes(org.xmlpull.v1.XmlSerializer serializer)
          Serializes the attributes stored within this instance, if any.
 void setAttribute(QName name, CustomAttributeValue value)
          Sets the value for the attribute with the specified name.
 void setAttribute(QName name, java.lang.String value)
          Sets the value for the attribute with the specified name.
 void setAttributes(HashMap attributes)
          Sets all attributes at once to those contained within argument attributes.
 void setEventSource(boolean eventSource)
           
 java.lang.String toString()
           
 
Methods inherited from class org.ws4d.java.wsdl.NamedItem
getLocalName, getName, getNamespace, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUFFIX

public static final java.lang.String SUFFIX
See Also:
Constant Field Values
Constructor Detail

WSDLPortType

public WSDLPortType()

WSDLPortType

public WSDLPortType(QName name)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class NamedItem

getAttribute

public CustomAttributeValue getAttribute(QName name)
Description copied from interface: Attributable
Returns the value of the attribute with the given name or null, if this attribute is not available (or if its value is actually explicitly set to null).

Specified by:
getAttribute in interface Attributable
Parameters:
name - the name of the attribute of which to query the value
Returns:
the value of the named attribute or null

setAttribute

public void setAttribute(QName name,
                         CustomAttributeValue value)
Description copied from interface: Attributable
Sets the value for the attribute with the specified name. Throws a java.lang.IllegalArgumentException in case name is null.

Specified by:
setAttribute in interface Attributable
Parameters:
name - the name of the attribute to set, must not be null
value - the value to set the named attribute to (may be null

setAttribute

public void setAttribute(QName name,
                         java.lang.String value)
Description copied from interface: Attributable
Sets the value for the attribute with the specified name. The value will be represented as plain String. It will be wrapped within a new instance of StringAttributeValue. This method throws a java.lang.IllegalArgumentException in case name is null.

This is a shorthand for setAttribute(name, new StringAttributeValue(value)).

Specified by:
setAttribute in interface Attributable
Parameters:
name - the name of the attribute to set, must not be null
value - the value to set the named attribute to (may be null

getAttributes

public HashMap getAttributes()
Description copied from interface: Attributable
Returns all attributes explicitly set for this Attributable instance. Note that depending on the actual implementation the returned reference may point at the 'life map', i .e. the actual storage for the attributes. Thus, modifications to that map should be performed with care and keeping this in mind.

Specified by:
getAttributes in interface Attributable
Returns:
all already set attributes

setAttributes

public void setAttributes(HashMap attributes)
Description copied from interface: Attributable
Sets all attributes at once to those contained within argument attributes. Note that depending on the actual implementation it is possible that the map attributes points at may be used for the actual internal storage of the attributes (i.e. without copying it). That is why, after passing it to this method, modifications to this map should be made with care. This method throws a java.lang.IllegalArgumentException in cases where attributes is null.

Specified by:
setAttributes in interface Attributable
Parameters:
attributes - the new attributes to set

hasAttributes

public boolean hasAttributes()
Description copied from interface: Attributable
Returns true only if this instance has at least one attribute set. Returns false in any other case.

Specified by:
hasAttributes in interface Attributable
Returns:
true only if there is at least one attribute set within this instance

serializeAttributes

public void serializeAttributes(org.xmlpull.v1.XmlSerializer serializer)
                         throws java.io.IOException
Description copied from interface: Attributable
Serializes the attributes stored within this instance, if any.

Specified by:
serializeAttributes in interface Attributable
Parameters:
serializer - the serializer to which to send output
Throws:
java.io.IOException - in case writing to serializer fails for any reason

isEventSource

public boolean isEventSource()
Returns:
the eventSource

setEventSource

public void setEventSource(boolean eventSource)
Parameters:
eventSource - the eventSource to set

getOperation

public WSDLOperation getOperation(java.lang.String name,
                                  java.lang.String inputName,
                                  java.lang.String outputName)
Parameters:
name - the local name of the operation to return
inputName - the name of the operation's input element if any; needed, in case more than one operation with the same name is defined within the same port type
outputName - the name of the operation's output element, if any; needed in case more than one operation with the same name is defined within the same port type
Returns:
the named operation or null

getOperations

public DataStructure getOperations()

addOperation

public void addOperation(WSDLOperation operation)
Parameters:
operation - throws IllegalArgumentException in case an operation with exactly the same name and NO input and output already exists

getWsdl

public WSDL getWsdl()
Returns:
the wsdl