org.apache.wsif.providers.jms
Class WSIFOperation_Jms

java.lang.Object
  extended by org.apache.wsif.base.WSIFDefaultOperation
      extended by org.apache.wsif.providers.jms.WSIFOperation_Jms
All Implemented Interfaces:
java.io.Serializable, WSIFOperation

public class WSIFOperation_Jms
extends WSIFDefaultOperation
implements WSIFOperation

WSIFOperation_Jms

Author:
Hermann Akermann, Ant Elder, Norman Seto
See Also:
Serialized Form

Constructor Summary
WSIFOperation_Jms(javax.wsdl.Port basePort, javax.wsdl.BindingOperation bindingOperation, WSIFPort_Jms jmsPort)
          ctor
 
Method Summary
 WSIFOperation_Jms copy()
          Create a new copy of this object.
 java.lang.String deep()
           
 void executeInputOnlyOperation(WSIFMessage input)
          executeInputOnlyOperation(WSIFMessage) WSDL transmission primitive Notification (fire&forget)
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
          executeRequestResponseAsync(WSIFMessage) This is the simple async form where the client is expected to handle the correlating of the response.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input, WSIFResponseHandler handler)
          executeRequestResponseAsync(WSIFMessage, WSIFResponseHandler)
 boolean executeRequestResponseOperation(WSIFMessage input, WSIFMessage output, WSIFMessage fault)
          executeRequestResponseOperation(WSIFMessage, WSIFMessage, WSIFMessage) synchronous execution is NOT supported for JMS
 void fireAsyncResponse(java.lang.Object response)
          fireAsyncResponse is called when a response has been received for a previous executeRequestResponseAsync call.
 int getJMSMessageType()
           
 WSIFPort getWSIFPort()
           
 boolean isAsyncOperation()
          Tests if the currently executing request is an asynchronous request.
 boolean processAsyncResponse(java.lang.Object responseObject, WSIFMessage output, WSIFMessage fault)
          Default implemantation of processAsyncResponse.
static void setJMSMessageOutputHeaderProperties(javax.jms.Message targetMsg, WSIFMessage srcMsg, JMSFormatter formatter)
          Sets JMS properties on a JMS message This has the side effect of removing the JMS properties from the srcMsg WSIFMessage.
 
Methods inherited from class org.apache.wsif.base.WSIFDefaultOperation
addInputJmsPropertyValues, createFaultMessage, createFaultMessage, createInputMessage, createInputMessage, createOutputMessage, createOutputMessage, getContext, getInputJmsProperties, getInputJmsPropertyValues, getOutputJmsProperties, setContext, setInputJmsProperties, setInputJmsProperties, setInputJmsPropertyValues, setOutputJmsProperties, setOutputJmsProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.wsif.WSIFOperation
createFaultMessage, createFaultMessage, createInputMessage, createInputMessage, createOutputMessage, createOutputMessage, getContext, setContext
 

Constructor Detail

WSIFOperation_Jms

public WSIFOperation_Jms(javax.wsdl.Port basePort,
                         javax.wsdl.BindingOperation bindingOperation,
                         WSIFPort_Jms jmsPort)
                  throws WSIFException
ctor

Throws:
WSIFException
Method Detail

copy

public WSIFOperation_Jms copy()
                       throws WSIFException
Create a new copy of this object. This is not a clone, since it does not copy the referenced objects as well.

Throws:
WSIFException

executeRequestResponseOperation

public boolean executeRequestResponseOperation(WSIFMessage input,
                                               WSIFMessage output,
                                               WSIFMessage fault)
                                        throws WSIFException
executeRequestResponseOperation(WSIFMessage, WSIFMessage, WSIFMessage) synchronous execution is NOT supported for JMS

Specified by:
executeRequestResponseOperation in interface WSIFOperation
Specified by:
executeRequestResponseOperation in class WSIFDefaultOperation
Parameters:
input - input message to send to the operation
output - an empty message which will be filled in if the operation invocation succeeds. If it does not succeed, the contents of this message are undefined. (This is a return value of this method.)
fault - an empty message which will be filled in if the operation invocation fails. If it succeeds, the contents of this message are undefined. (This is a return value of this method.)
Returns:
true or false indicating whether a fault message was generated or not. The truth value indicates whether the output or fault message has useful information.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseOperation(WSIFMessage, WSIFMessage, WSIFMessage)

executeInputOnlyOperation

public void executeInputOnlyOperation(WSIFMessage input)
                               throws WSIFException
executeInputOnlyOperation(WSIFMessage) WSDL transmission primitive Notification (fire&forget)

Specified by:
executeInputOnlyOperation in interface WSIFOperation
Specified by:
executeInputOnlyOperation in class WSIFDefaultOperation
Parameters:
input - input message to send to the operation
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeInputOnlyOperation(WSIFMessage)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
                                              throws WSIFException
executeRequestResponseAsync(WSIFMessage) This is the simple async form where the client is expected to handle the correlating of the response.

Specified by:
executeRequestResponseAsync in interface WSIFOperation
Overrides:
executeRequestResponseAsync in class WSIFDefaultOperation
Parameters:
input - input message to send to the operation
Returns:
the correlation ID or the request. The correlation ID is used to associate the request with the WSIFOperation.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage)

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input,
                                                     WSIFResponseHandler handler)
                                              throws WSIFException
executeRequestResponseAsync(WSIFMessage, WSIFResponseHandler)

Specified by:
executeRequestResponseAsync in interface WSIFOperation
Overrides:
executeRequestResponseAsync in class WSIFDefaultOperation
Parameters:
input - input message to send to the operation
handler - the response handler that will be notified when the asynchronous response becomes available.
Returns:
the correlation ID or the request. The correlation ID is used to associate the request with the WSIFOperation.
Throws:
WSIFException - if something goes wrong.
See Also:
WSIFOperation.executeRequestResponseAsync(WSIFMessage, WSIFResponseHandler)

processAsyncResponse

public boolean processAsyncResponse(java.lang.Object responseObject,
                                    WSIFMessage output,
                                    WSIFMessage fault)
                             throws WSIFException
Description copied from class: WSIFDefaultOperation
Default implemantation of processAsyncResponse. By default async operation is not supported so this just throws an exception.

Specified by:
processAsyncResponse in interface WSIFOperation
Overrides:
processAsyncResponse in class WSIFDefaultOperation
Parameters:
responseObject - an Object representing the response.
output - an empty message which will be filled in if the operation invocation succeeds. If it does not succeed, the contents of this message are undefined. (This is a return value of this method.)
fault - an empty message which will be filled in if the operation invocation fails. If it succeeds, the contents of this message are undefined. (This is a return value of this method.)
Returns:
true or false indicating whether a fault message was generated or not. The truth value indicates whether the output or fault message has useful information.
Throws:
WSIFException - if something goes wrong
See Also:
WSIFOperation.processAsyncResponse(Object,WSIFMessage,WSIFMessage)

fireAsyncResponse

public void fireAsyncResponse(java.lang.Object response)
                       throws WSIFException
fireAsyncResponse is called when a response has been received for a previous executeRequestResponseAsync call.

Specified by:
fireAsyncResponse in interface WSIFOperation
Overrides:
fireAsyncResponse in class WSIFDefaultOperation
Parameters:
response - an Object representing the response
Throws:
WSIFException - if something goes wrong
See Also:
WSIFOperation.fireAsyncResponse(Object)

getJMSMessageType

public int getJMSMessageType()

isAsyncOperation

public boolean isAsyncOperation()
Tests if the currently executing request is an asynchronous request.

Returns:
true if the current request is a asynchronous request, otherwise false

getWSIFPort

public WSIFPort getWSIFPort()
Specified by:
getWSIFPort in class WSIFDefaultOperation

setJMSMessageOutputHeaderProperties

public static void setJMSMessageOutputHeaderProperties(javax.jms.Message targetMsg,
                                                       WSIFMessage srcMsg,
                                                       JMSFormatter formatter)
                                                throws WSIFException
Sets JMS properties on a JMS message This has the side effect of removing the JMS properties from the srcMsg WSIFMessage.

Parameters:
targetMsg - the JMS message where properties will be set
srcMsg - WSIF message containing the JMS property values
formatter - JMSFormatter holding WSDL definitions defining which JMS properties should be set
Throws:
WSIFException

deep

public java.lang.String deep()


Copyright ? 2002, 2006 Apache XML Project. All Rights Reserved.