org.apache.wsif.providers
Class ModelWSIFOperation

java.lang.Object
  |
  +--org.apache.wsif.providers.ModelWSIFOperation
All Implemented Interfaces:
java.io.Serializable, WSIFOperation

public abstract class ModelWSIFOperation
extends java.lang.Object
implements WSIFOperation

ModelWSIFOperation Models are provided for all the classes required to be implemented when writing a WSIF provider: WSIFProvider, WSIFPort, and WSIFOperation. The models are intended to simplify the work in the implementing subclasses, and insure that all providers work in standard way. Things like hunting around in the WSDL for ExtensabilityElements and verifying the types of request and response objects against the WSDL should be done in the model code. Subclasses should only need to provide code directly related to accessing the particular service type they implement. For a subclass to use ModelWSIFOperation, as a minimum it would implement the doInvokeRequestResponse method. If special processing is required for input only operations then subclasses would also implement doInvokeInputOnly. If the binding being implemented uses a binding operation extensibility element then subclasses should override the getOperationExtensibilityClass, and validateOperationExtensibilityElement methods. Other methods may be overriden to customise the behaviour, see the method javadoc for details.

Author:
Ant Elder
See Also:
Serialized Form

Constructor Summary
ModelWSIFOperation(ModelWSIFPort wsifPort, javax.wsdl.BindingOperation bindingOperation)
          Construct a ModelWSIFOperation
 
Method Summary
 WSIFMessage createFaultMessage()
          Create a fault message that may be received into via this port.
 WSIFMessage createFaultMessage(java.lang.String name)
          Create a fault message that may be received into via this port.
 WSIFMessage createInputMessage()
          Create an input message that will be sent via this port.
 WSIFMessage createInputMessage(java.lang.String name)
          Create an input message that will be sent via this port.
 WSIFMessage createOutputMessage()
          Create an output message that will be received into via this port.
 WSIFMessage createOutputMessage(java.lang.String name)
          Create an output message that will be received into via this port.
 java.lang.String deep()
          String representation of this WSIFOperation for WSIF Trc.
 void executeInputOnlyOperation(WSIFMessage inMsg)
          Execute an input-only operation.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage inMsg)
          Execute an asynchronous request
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage inMsg, WSIFResponseHandler handler)
          Execute an asynchronous request
 boolean executeRequestResponseOperation(WSIFMessage inMsg, WSIFMessage outMsg, WSIFMessage faultMsg)
          Execute a request-response operation.
 void fireAsyncResponse(java.lang.Object response)
          fireAsyncResponse is called when a response has been received for a previous executeRequestResponseAsync call.
 WSIFMessage getContext()
          Gets the context information for this binding.
 javax.wsdl.Operation getPortTypeOperation()
          Get the WSDL portType operation this WSIFOperation implements.
 boolean processAsyncResponse(java.lang.Object response, WSIFMessage outMsg, WSIFMessage faultMsg)
          Processes the response to an asynchronous request.
 void setContext(WSIFMessage context)
          Allows the application programmer or stub to pass context information to the binding.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelWSIFOperation

public ModelWSIFOperation(ModelWSIFPort wsifPort,
                          javax.wsdl.BindingOperation bindingOperation)
                   throws WSIFException
Construct a ModelWSIFOperation
Method Detail

executeInputOnlyOperation

public void executeInputOnlyOperation(WSIFMessage inMsg)
                               throws WSIFException
Description copied from interface: WSIFOperation
Execute an input-only operation.
Specified by:
executeInputOnlyOperation in interface WSIFOperation
See Also:
WSIFOperation.executeInputOnlyOperation(WSIFMessage)

executeRequestResponseOperation

public boolean executeRequestResponseOperation(WSIFMessage inMsg,
                                               WSIFMessage outMsg,
                                               WSIFMessage faultMsg)
                                        throws WSIFException
Description copied from interface: WSIFOperation
Execute a request-response operation. The signature allows for input, output and fault messages. WSDL in fact allows one to describe the set of possible faults an operation may result in, however, only one fault can occur at any one time.
Specified by:
executeRequestResponseOperation in interface WSIFOperation
See Also:
WSIFOperation#executeInputOnlyOperation(WSIFMessage,WSIFMessage,WSIFMessage)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage inMsg)
                                              throws WSIFException
Description copied from interface: WSIFOperation
Execute an asynchronous request
Specified by:
executeRequestResponseAsync in interface WSIFOperation
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage inMsg,
                                                     WSIFResponseHandler handler)
                                              throws WSIFException
Description copied from interface: WSIFOperation
Execute an asynchronous request
Specified by:
executeRequestResponseAsync in interface WSIFOperation
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage, WSIFResponseHandler)

fireAsyncResponse

public void fireAsyncResponse(java.lang.Object response)
                       throws WSIFException
Description copied from interface: WSIFOperation
fireAsyncResponse is called when a response has been received for a previous executeRequestResponseAsync call.
Specified by:
fireAsyncResponse in interface WSIFOperation
See Also:
WSIFOperation.fireAsyncResponse(Object)

processAsyncResponse

public boolean processAsyncResponse(java.lang.Object response,
                                    WSIFMessage outMsg,
                                    WSIFMessage faultMsg)
                             throws WSIFException
Description copied from interface: WSIFOperation
Processes the response to an asynchronous request. This is called for when the asynchronous operation was initiated without a WSIFResponseHandler, that is, by calling the executeRequestResponseAsync(WSIFMessage input) method.
Specified by:
processAsyncResponse in interface WSIFOperation
See Also:
WSIFOperation.processAsyncResponse(Object,WSIFMessage,WSIFMessage)

getPortTypeOperation

public javax.wsdl.Operation getPortTypeOperation()
Get the WSDL portType operation this WSIFOperation implements.
See Also:
WSIFDefaultOperation#getOperation()

createInputMessage

public WSIFMessage createInputMessage()
Description copied from interface: WSIFOperation
Create an input message that will be sent via this port. It is responsibility of caller to set message name.
Specified by:
createInputMessage in interface WSIFOperation
See Also:
WSIFOperation.createInputMessage()

createInputMessage

public WSIFMessage createInputMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create an input message that will be sent via this port.
Specified by:
createInputMessage in interface WSIFOperation
See Also:
WSIFOperation.createInputMessage(String)

createOutputMessage

public WSIFMessage createOutputMessage()
Description copied from interface: WSIFOperation
Create an output message that will be received into via this port. It is responsibility of caller to set message name.
Specified by:
createOutputMessage in interface WSIFOperation
See Also:
WSIFOperation.createOutputMessage()

createOutputMessage

public WSIFMessage createOutputMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create an output message that will be received into via this port.
Specified by:
createOutputMessage in interface WSIFOperation
See Also:
WSIFOperation.createOutputMessage(String)

createFaultMessage

public WSIFMessage createFaultMessage()
Description copied from interface: WSIFOperation
Create a fault message that may be received into via this port. It is responsibility of caller to set message name.
Specified by:
createFaultMessage in interface WSIFOperation
See Also:
WSIFOperation.createFaultMessage()

createFaultMessage

public WSIFMessage createFaultMessage(java.lang.String name)
Description copied from interface: WSIFOperation
Create a fault message that may be received into via this port.
Specified by:
createFaultMessage in interface WSIFOperation
See Also:
WSIFOperation.createFaultMessage(String)

getContext

public WSIFMessage getContext()
                       throws WSIFException
Gets the context information for this binding.
Specified by:
getContext in interface WSIFOperation
Following copied from interface: org.apache.wsif.WSIFOperation
Returns:
context

setContext

public void setContext(WSIFMessage context)
Allows the application programmer or stub to pass context information to the binding. The Port implementation may use this context - for example to update a SOAP header. There is no definition of how a Port may utilize the context.
Specified by:
setContext in interface WSIFOperation
Following copied from interface: org.apache.wsif.WSIFOperation
Parameters:
context - context information

deep

public java.lang.String deep()
String representation of this WSIFOperation for WSIF Trc.


Copyright © 2002, 2003 Apache XML Project. All Rights Reserved.