org.apache.wsif.providers.soap.apachesoap
Class WSIFOperation_ApacheSOAP

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

public class WSIFOperation_ApacheSOAP
extends WSIFDefaultOperation
implements WSIFOperation, java.io.Serializable

Provide concrete implementation of WSDL operation with Apache SOAP RPC method invocation.

Author:
Alekander Slominski, Owen Burroughs , Ant Elder , Jeremy Hughes , Mark Whitlock
See Also:
Serialized Form

Constructor Summary
WSIFOperation_ApacheSOAP(WSIFPort_ApacheSOAP pi, javax.wsdl.Operation op, WSIFDynamicTypeMap typeMap)
          Create Apache SOAP operation instance that encapsultes all necessary information required to create and execute Apache SOAP Call.
 
Method Summary
 WSIFOperation_ApacheSOAP copy()
          Create a new copy of this object.
 java.lang.String deep()
           
 void executeInputOnlyOperation(WSIFMessage input)
          Execute an input-only operation.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
          Performs a request response operation asynchronously.
 WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input, WSIFResponseHandler handler)
          Performs a request response operation asynchronously.
 boolean executeRequestResponseOperation(WSIFMessage input, WSIFMessage output, WSIFMessage fault)
          Execute a request-response operation.
 void fireAsyncResponse(java.lang.Object response)
          fireAsyncResponse is called by an AsyncListener when a response has been received for a previous executeRequestResponseAsync call.
 WSIFCorrelationId getAsyncRequestID()
          Gets the correlation ID of the last request sent by the executeRequestResponseAsync method.
 javax.wsdl.Definition getDefinition()
           
 WSIFPort_ApacheSOAP getDynamicWSIFPort()
           
 java.lang.String getInputEncodingStyle()
           
 java.lang.String getInputNamespace()
           
 java.lang.String getInputUse()
          Gets the inputUse.
 java.lang.String getName()
          Return name of operation.
 javax.wsdl.Operation getOperation()
           
 java.lang.String getOutputEncodingStyle()
           
 java.lang.String getOutputUse()
          Gets the outputUse.
 java.util.List getPartNames()
           
 java.lang.String getPartSerializerName()
          Gets the partSerializerName.
 java.lang.String getReturnName()
           
 java.lang.String getSoapActionURI()
           
 java.lang.String getStyle()
          Gets the style.
 java.lang.String getTargetNamespaceURI()
          Gets the target namespace URI of this WSIFOperation
 org.apache.soap.transport.SOAPTransport getTransport()
          Gets the transport being used by this operation
 WSIFPort getWSIFPort()
           
 boolean invokeRequestResponseOperation(WSIFMessage input, WSIFMessage output, WSIFMessage fault)
          Invoke RPC operation using ApacheSOAP
 boolean invokeRequestResponseOperationDocument(WSIFMessage input, WSIFMessage output, WSIFMessage fault)
           
 boolean isAsyncOperation()
          Tests if the currently executing request is an asynchronous request.
 boolean processAsyncResponse(java.lang.Object response, WSIFMessage output, WSIFMessage fault)
          Processes the response to an asynchronous request.
 void setDefinition(javax.wsdl.Definition value)
           
 void setDynamicWSIFPort(WSIFPort_ApacheSOAP value)
           
 void setInputEncodingStyle(java.lang.String value)
           
 void setInputNamespace(java.lang.String value)
           
 void setInputUse(java.lang.String inputUse)
          Sets the inputUse.
 void setOperation(javax.wsdl.Operation value)
           
 void setOutputEncodingStyle(java.lang.String value)
           
 void setOutputUse(java.lang.String outputUse)
          Sets the outputUse.
 void setPartNames(java.util.List value)
           
 void setPartSerializerName(java.lang.String partSerializerName)
          Sets the partSerializerName.
 void setReturnName(java.lang.String value)
           
 void setSoapActionURI(java.lang.String value)
           
 void setStyle(java.lang.String style)
          Sets the style.
 
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_ApacheSOAP

public WSIFOperation_ApacheSOAP(WSIFPort_ApacheSOAP pi,
                                javax.wsdl.Operation op,
                                WSIFDynamicTypeMap typeMap)
                         throws WSIFException
Create Apache SOAP operation instance that encapsultes all necessary information required to create and execute Apache SOAP Call.

Throws:
WSIFException
Method Detail

copy

public WSIFOperation_ApacheSOAP 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

getTargetNamespaceURI

public java.lang.String getTargetNamespaceURI()
Gets the target namespace URI of this WSIFOperation

Returns:
the target namespace URI

executeRequestResponseOperation

public boolean executeRequestResponseOperation(WSIFMessage input,
                                               WSIFMessage output,
                                               WSIFMessage fault)
                                        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
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
Description copied from interface: WSIFOperation
Execute an input-only operation.

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)

invokeRequestResponseOperation

public boolean invokeRequestResponseOperation(WSIFMessage input,
                                              WSIFMessage output,
                                              WSIFMessage fault)
                                       throws WSIFException
Invoke RPC operation using ApacheSOAP

Throws:
WSIFException

invokeRequestResponseOperationDocument

public boolean invokeRequestResponseOperationDocument(WSIFMessage input,
                                                      WSIFMessage output,
                                                      WSIFMessage fault)
                                               throws WSIFException
Throws:
WSIFException

executeRequestResponseAsync

public WSIFCorrelationId executeRequestResponseAsync(WSIFMessage input)
                                              throws WSIFException
Performs a request response operation asynchronously.

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
Performs a request response operation asynchronously.

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)

fireAsyncResponse

public void fireAsyncResponse(java.lang.Object response)
                       throws WSIFException
fireAsyncResponse is called by an AsyncListener when a response has been received for a previous executeRequestResponseAsync call. This WSIFOperation will have been serialized in the correlation service when the request was sent. When the AsynListener is notified that a response has arrived for the request it unserializes this WSIFOperation from the corelation service and calls this method. This method will then unmarshal the reponse and pass it to the executeAsyncResponse method of the associated WSIFResponseHandler.

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

processAsyncResponse

public boolean processAsyncResponse(java.lang.Object response,
                                    WSIFMessage output,
                                    WSIFMessage fault)
                             throws WSIFException
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
Overrides:
processAsyncResponse in class WSIFDefaultOperation
Parameters:
response - 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)

getName

public java.lang.String getName()
Return name of operation.


getSoapActionURI

public java.lang.String getSoapActionURI()

setSoapActionURI

public void setSoapActionURI(java.lang.String value)

getInputNamespace

public java.lang.String getInputNamespace()

setInputNamespace

public void setInputNamespace(java.lang.String value)

getInputEncodingStyle

public java.lang.String getInputEncodingStyle()

setInputEncodingStyle

public void setInputEncodingStyle(java.lang.String value)

getOutputEncodingStyle

public java.lang.String getOutputEncodingStyle()

setOutputEncodingStyle

public void setOutputEncodingStyle(java.lang.String value)

getPartNames

public java.util.List getPartNames()

setPartNames

public void setPartNames(java.util.List value)

getReturnName

public java.lang.String getReturnName()

setReturnName

public void setReturnName(java.lang.String value)

getOperation

public javax.wsdl.Operation getOperation()

setOperation

public void setOperation(javax.wsdl.Operation value)

getDefinition

public javax.wsdl.Definition getDefinition()

setDefinition

public void setDefinition(javax.wsdl.Definition value)

getDynamicWSIFPort

public WSIFPort_ApacheSOAP getDynamicWSIFPort()

setDynamicWSIFPort

public void setDynamicWSIFPort(WSIFPort_ApacheSOAP value)

getStyle

public java.lang.String getStyle()
Gets the style.

Returns:
Returns a String

getTransport

public org.apache.soap.transport.SOAPTransport getTransport()
Gets the transport being used by this operation

Returns:
the current transport

getAsyncRequestID

public WSIFCorrelationId getAsyncRequestID()
Gets the correlation ID of the last request sent by the executeRequestResponseAsync method.

Returns:
the corelation ID of the previous request

setStyle

public void setStyle(java.lang.String style)
Sets the style.

Parameters:
style - The style to set

getInputUse

public java.lang.String getInputUse()
Gets the inputUse.

Returns:
Returns a String

setInputUse

public void setInputUse(java.lang.String inputUse)
Sets the inputUse.

Parameters:
inputUse - The inputUse to set

getOutputUse

public java.lang.String getOutputUse()
Gets the outputUse.

Returns:
Returns a String

setOutputUse

public void setOutputUse(java.lang.String outputUse)
Sets the outputUse.

Parameters:
outputUse - The outputUse to set

getPartSerializerName

public java.lang.String getPartSerializerName()
Gets the partSerializerName.

Returns:
Returns a String

getWSIFPort

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

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

setPartSerializerName

public void setPartSerializerName(java.lang.String partSerializerName)
Sets the partSerializerName.

Parameters:
partSerializerName - The partSerializerName to set

deep

public java.lang.String deep()


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