org.apache.axis2.client
Class InOutMEPClient

java.lang.Object
  extended byorg.apache.axis2.client.MEPClient
      extended byorg.apache.axis2.client.InOutMEPClient
Direct Known Subclasses:
Call

public class InOutMEPClient
extends MEPClient

This class captures the handling of In-Out type method invocations for both blocking and non-blocking calls. The basic API is based on MessageContext and provides more convenient APIs.

See Also:
ServiceClient

Nested Class Summary
 class InOutMEPClient.SyncCallBack
          Deprecated. This class acts as a callback that allows users to wait on the result.
 
Field Summary
protected  CallbackReceiver callbackReceiver
          Deprecated. This is used for the receiving the asynchronous messages.
 
Fields inherited from class org.apache.axis2.client.MEPClient
clientOptions, mep
 
Constructor Summary
InOutMEPClient(ServiceContext serviceContext)
          Deprecated. Constructs a InOutMEPClient from a ServiceContext.
 
Method Summary
 void close()
          Deprecated. Closes the call initiated to the Transport Listeners.
protected  void configureTransportInformation(MessageContext msgCtx)
          Deprecated. This gives chance to the derived class to configure its transport from the information injected by the user via options.
 MessageContext invokeBlocking(AxisOperation axisop, MessageContext msgctx)
          Deprecated. This method is used to make blocking calls.
 void invokeNonBlocking(AxisOperation axisop, MessageContext msgctx, Callback callback)
          Deprecated. This method is used to make non-blocking calls and is independent of the transport.
 MessageContext send(MessageContext msgctx, TransportInDescription transportIn)
          Deprecated. Sends the message using a two way transport and waits for a response.
 
Methods inherited from class org.apache.axis2.client.MEPClient
addSOAPHeader, addSOAPHeader, addUserAddedSOAPHeaders, assumeServiceContext, createDefaultSOAPEnvelope, engageModule, getClientOptions, getServiceContext, inferTransport, inferTransport, inferTransportOutDescription, prepareInvocation, prepareTheSOAPEnvelope, setClientOptions, setServiceContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callbackReceiver

protected CallbackReceiver callbackReceiver
Deprecated. 
This is used for the receiving the asynchronous messages.

Constructor Detail

InOutMEPClient

public InOutMEPClient(ServiceContext serviceContext)
Deprecated. 
Constructs a InOutMEPClient from a ServiceContext. Ideally this should be generated from a WSDL, we do not have it yet.

Following code works for the time being.

 ConfigurationContextFactory efac = new ConfigurationContextFactory();
 // Replace the null with your client repository if any
 ConfigurationContext sysContext = efac.createConfigurationContext(null);
 // above line "null" may be a file name if you know the client repssitory
 

//create new service QName assumedServiceName = new QName("Your Service"); AxisService axisService = new AxisService(assumedServiceName); sysContext.getEngineConfig().addService(axisService); ServiceContext service = sysContext.createServiceContext(assumedServiceName); return service;

Parameters:
serviceContext -
Method Detail

close

public void close()
           throws AxisFault
Deprecated. 
Closes the call initiated to the Transport Listeners. If there are multiple requests sent, the call should be closed only when all are are done.

Throws:
AxisFault

configureTransportInformation

protected void configureTransportInformation(MessageContext msgCtx)
                                      throws AxisFault
Deprecated. 
Description copied from class: MEPClient
This gives chance to the derived class to configure its transport from the information injected by the user via options. This is called within the prepare invocation method, so user does not need to call this explicitly.

Specified by:
configureTransportInformation in class MEPClient
Throws:
AxisFault

invokeBlocking

public MessageContext invokeBlocking(AxisOperation axisop,
                                     MessageContext msgctx)
                              throws AxisFault
Deprecated. 
This method is used to make blocking calls. This is independent of the transport. For e.g. invocation done with this method might
  1. send request via http and receive the response at the same http connection.
  2. send request via http and receive the response at a different http connection.
  3. send request via an email smtp and receive the response via an email.

Throws:
AxisFault

invokeNonBlocking

public void invokeNonBlocking(AxisOperation axisop,
                              MessageContext msgctx,
                              Callback callback)
                       throws AxisFault
Deprecated. 
This method is used to make non-blocking calls and is independent of the transport. For e.g. invocation done with this method might
  1. send request via http and receive the response at the same http connection.
  2. send request via http and receive the response at a different http connection.
  3. send request via an email smtp and receive the response via an email.

Throws:
AxisFault

send

public MessageContext send(MessageContext msgctx,
                           TransportInDescription transportIn)
                    throws AxisFault
Deprecated. 
Sends the message using a two way transport and waits for a response.

Parameters:
msgctx -
transportIn -
Returns:
Returns MessageContext.
Throws:
AxisFault