WSO2Con 2013 CFP Banner

Specifying Service Level Message Receivers

Discuss this article on Stack Overflow
By Deepal Jayasingha
  • 4 Sep, 2006
  • Level: 
  • Reads: 3194

A Message receiver is a special handler in Apache Axis2, and it is the last handler in the in-path. Each and every operation in a service has its own message receiver, and the type of message receiver may differ from one operation to another. A Message receiver is MEP (Message Exchange Pattern) dependent, so you can have different message receiver for different MEPs.

Take the scenario where you want to use same message receiver for all the operations in a given service. You can easily do this by adding service level message receiver. In this case you do not need to specify message receiver at the operation level.

<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>

Applies To:

Apache Axis2/Java 1.0
WSO2Con 2014 USA