org.apache.axis2.clientapi
Class MEPClient

java.lang.Object
  extended byorg.apache.axis2.clientapi.MEPClient
Direct Known Subclasses:
InOnlyMEPClient, InOutMEPClient

public abstract class MEPClient
extends java.lang.Object

This is the Super Class for all the MEPClients, All the MEPClient will extend this.


Field Summary
protected  boolean doREST
           
protected  boolean doRestThroughPOST
           
protected  boolean isExceptionToBeThrownOnSOAPFault
           
protected  java.lang.String mep
           
protected  ServiceContext serviceContext
           
protected  java.lang.String soapAction
           
protected  java.lang.String soapVersionURI
           
protected  java.lang.String wsaAction
           
 
Constructor Summary
MEPClient(ServiceContext service, java.lang.String mep)
           
 
Method Summary
 SOAPEnvelope createDefaultSOAPEnvelope()
          create write SOAPEvelope(in terms of version) based on the values set.
 void engageModule(javax.xml.namespace.QName name)
          Engage a given Module to the current invocation.
 java.lang.String getSoapAction()
           
 TransportOutDescription inferTransport(EndpointReference epr)
          try to infer the transport looking at the URL, the URL can be http:// tcp:// mail:// local://.
protected  void prepareInvocation(OperationDescription axisop, MessageContext msgCtx)
          prepare the message context for invocation, here the properties kept in the MEPClient copied to the MessageContext
protected  MessageContext prepareTheSOAPEnvelope(OMElement toSend)
          This class prepare the SOAP Envelope using the payload
 void setDoREST(boolean b)
           
 void setExceptionToBeThrownOnSOAPFault(boolean exceptionToBeThrownOnSOAPFault)
           
 void setRestThroughPOST(boolean b)
           
 void setSoapAction(java.lang.String string)
           
 void setSoapVersionURI(java.lang.String string)
           
 void setWsaAction(java.lang.String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceContext

protected ServiceContext serviceContext

mep

protected final java.lang.String mep

soapVersionURI

protected java.lang.String soapVersionURI

soapAction

protected java.lang.String soapAction

doREST

protected boolean doREST

doRestThroughPOST

protected boolean doRestThroughPOST

wsaAction

protected java.lang.String wsaAction

isExceptionToBeThrownOnSOAPFault

protected boolean isExceptionToBeThrownOnSOAPFault
Constructor Detail

MEPClient

public MEPClient(ServiceContext service,
                 java.lang.String mep)
Method Detail

setRestThroughPOST

public void setRestThroughPOST(boolean b)

setDoREST

public void setDoREST(boolean b)

getSoapAction

public java.lang.String getSoapAction()

prepareInvocation

protected void prepareInvocation(OperationDescription axisop,
                                 MessageContext msgCtx)
                          throws AxisFault
prepare the message context for invocation, here the properties kept in the MEPClient copied to the MessageContext

Throws:
AxisFault

prepareTheSOAPEnvelope

protected MessageContext prepareTheSOAPEnvelope(OMElement toSend)
                                         throws AxisFault
This class prepare the SOAP Envelope using the payload

Parameters:
toSend -
Returns:
Throws:
AxisFault

inferTransport

public TransportOutDescription inferTransport(EndpointReference epr)
                                       throws AxisFault
try to infer the transport looking at the URL, the URL can be http:// tcp:// mail:// local://. The method will look for the trnasport name as the protocol part of the transport.

Parameters:
epr -
Returns:
Throws:
AxisFault

createDefaultSOAPEnvelope

public SOAPEnvelope createDefaultSOAPEnvelope()
                                       throws AxisFault
create write SOAPEvelope(in terms of version) based on the values set.

Returns:
Throws:
AxisFault

engageModule

public void engageModule(javax.xml.namespace.QName name)
                  throws AxisFault
Engage a given Module to the current invocation. But to call this method the Module *MUST* be enable (picked up by the deployment and known to Axis2) else Exception will be thrown. To be detected put the moduels to the AXIS2_REPOSITORY/modules directory

Parameters:
name -
Throws:
AxisFault

setSoapVersionURI

public void setSoapVersionURI(java.lang.String string)
Parameters:
string -

setSoapAction

public void setSoapAction(java.lang.String string)
Parameters:
string -

setWsaAction

public void setWsaAction(java.lang.String string)
Parameters:
string -

setExceptionToBeThrownOnSOAPFault

public void setExceptionToBeThrownOnSOAPFault(boolean exceptionToBeThrownOnSOAPFault)
Parameters:
exceptionToBeThrownOnSOAPFault - - If there is a SOAP Fault in the body of the incoming SOAP Message, system can be configured to throw an exception with the details extracted from the information from the fault message. This boolean variable will enable that facility. If this is false, the response message will just be returned to the application, irrespective of whether it has a Fault or not.