org.ws4d.java.service
Interface OperationDescription

All Known Subinterfaces:
EventSource
All Known Implementing Classes:
DefaultEventSource, Operation, OperationCommons, OperationStub

public interface OperationDescription

Common Interface of operations and event sources.


Method Summary
 ParameterValue createFaultValue(java.lang.String faultName)
          This method creates a parameter value container for the fault with the given unique faultName (within the scope of this operation).
 ParameterValue createInputValue()
          This is a shorthand method for creating a parameter value container for this operation's input.
 ParameterValue createOutputValue()
          This is a shorthand method for creating a parameter value container for this operation's output.
 Fault getFault(java.lang.String faultName)
          Returns this operation's fault with the given faultName, which is considered to be unique within the operation's scope.
 int getFaultCount()
          Returns the number of declared faults for this operation.
 Iterator getFaults()
          Returns an Iterator over all faults declared for this operation.
 Element getInput()
          Returns the input element of this operation.
 java.lang.String getInputAction()
          Returns the WS-Addressing [action] property for this operation's input message.
 java.lang.String getInputName()
          /** Returns the name of the input of this operation.
 java.lang.String getName()
          Returns the local name of this operation.
 Element getOutput()
          Returns the output element of this operation.
 java.lang.String getOutputAction()
          Returns the WS-Addressing [action] property for this oepration's output message.
 java.lang.String getOutputName()
          Returns the name of the output of this operation.
 QName getPortType()
          Returns the port type to which this operation belongs.
 Service getService()
          Returns the service to which this operation is associated.
 int getType()
          Returns the transmission type of this operation according to WSDL 1.1 specification.
 

Method Detail

getName

java.lang.String getName()
Returns the local name of this operation. See note on overloading operations.

Returns:
the local name of this operation

getType

int getType()
Returns the transmission type of this operation according to WSDL 1.1 specification. The value returned is one of WSDLOperation.TYPE_ONE_WAY, WSDLOperation.TYPE_REQUEST_RESPONSE, WSDLOperation.TYPE_NOTIFICATION and WSDLOperation.TYPE_SOLICIT_RESPONSE.

Returns:
the transmission type of this operation

getInput

Element getInput()
Returns the input element of this operation. The input element defines the data structure for the input parameters of this operation. It can be used to create a suitable ParameterValue container for the actual values when sending messages to the operation.

Returns:
the input element

getInputAction

java.lang.String getInputAction()
Returns the WS-Addressing [action] property for this operation's input message. Will return null only if this operation's transmission type is WSDLOperation.TYPE_NOTIFICATION, i.e. the operation doesn't have any input. Otherwise, if no input action was explicitly set, this method will generate a default one according to the rules of WS-Addressing 1.0 - WSDL Binding.

Returns:
the WS-Addressing [action] property of this operation's input

getInputName

java.lang.String getInputName()
/** Returns the name of the input of this operation. If this operation doesn't have any input (i.e. its transmission type is WSDLOperation.TYPE_NOTIFICATION, null is returned. Otherwise, if no input name was set previously, a default input name is generated according to WSDL 1.1 Specification.

Returns:
this operation's input name

getOutput

Element getOutput()
Returns the output element of this operation. The output element defines the data structure for the output parameters of this operation. It can be used to create a suitable ParameterValue container for the actual values an operation returns.

Returns:
the output element

getOutputAction

java.lang.String getOutputAction()
Returns the WS-Addressing [action] property for this oepration's output message. Will return null only if this operation's transmission type is WSDLOperation.TYPE_ONE_WAY, i.e. the operation doesn't have any output. Otherwise, if no output action is explicitly set, this method will generate a default one according to the rules of WS-Addressing 1.0 - WSDL Binding.

Returns:
the WS-Addressing [action] property of this operation's output

getOutputName

java.lang.String getOutputName()
Returns the name of the output of this operation. If this operation doesn't have any output (i.e. its transmission type is WSDLOperation.TYPE_ONE_WAY, null is returned. Otherwise, if no output name has been previously set, a default output name is generated according to WSDL 1.1 Specification.

Returns:
this operation's output name

getFault

Fault getFault(java.lang.String faultName)
Returns this operation's fault with the given faultName, which is considered to be unique within the operation's scope.

Parameters:
faultName - the requested fault's name
Returns:
the fault with the given name or null if there is no fault with that name within this operation

getFaultCount

int getFaultCount()
Returns the number of declared faults for this operation.

Returns:
the number of declared faults

getFaults

Iterator getFaults()
Returns an Iterator over all faults declared for this operation.

Returns:
an iterator over this operation's faults
See Also:
OperationCommons.addFault(Fault)

getPortType

QName getPortType()
Returns the port type to which this operation belongs.

Returns:
this operation's port type

getService

Service getService()
Returns the service to which this operation is associated. May return null, if this operation has not yet been added to a particular service.

Returns:
the service this operation belongs to

createInputValue

ParameterValue createInputValue()
This is a shorthand method for creating a parameter value container for this operation's input. It is semantically equivalent to ParameterValue.createElementValue(getInput()); .

Returns:
a parameter container suitable for this operation's input
See Also:
ParameterValue.createElementValue(Element)

createOutputValue

ParameterValue createOutputValue()
This is a shorthand method for creating a parameter value container for this operation's output. It is semantically equivalent to ParameterValue.createElementValue(getOutput());.

Returns:
a parameter container suitable for this operation's output
See Also:
getOutput(), ParameterValue.createElementValue(Element)

createFaultValue

ParameterValue createFaultValue(java.lang.String faultName)
This method creates a parameter value container for the fault with the given unique faultName (within the scope of this operation).

Parameters:
faultName - the name of the fault to create a parameter container for
Returns:
the parameter container suitable for the specified fault
Throws:
java.util.NoSuchElementException - if a fault with the given name is not declared within this operation
See Also:
getFault(String)