Forgot to mention that you don't need any extra work, if you use default flow of WS-Addressing. Sender adds their MessageID to the request message and the receiver puts incoming MessageID into the RelatesTo field of the response message. Thus, each message has its own unique MessageID while response messages also have MessageID of the request in their RelatesTo field.
Regards, Ali Sadik Kumlali ----- Original Message ---- From: Ali Sadik Kumlali <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, August 22, 2006 10:37:27 PM Subject: Re: [Axis2] Message Id tracking Michael, Sometime back, I did similar thing. What you need depends on the MEP you've selected. I assume you use: - In-out receiver (e.g. RawXMLINOutMessageReceiver) - MessageID of WS-Addressing as unique identifier Could you please try followings? You may run into problems as I haven't tried these :) module.xml ----------------- <module name="test" class="com.mycompany.axis2.module.test.MyTestModule"> <Description>This module is used for passing incoming message id back to the sender.</Description> <outflow> <handler name="MyTestModuleOutHandler" class="com.mycompany.axis2.module.test.MyTestModuleOutHandler"> <order phase="MyTestModuleOutPhase"/> </handler> </outflow> </module> module handler ---------------------- public class MyTestModuleOutHandler extends AbstractRegistererHandler { public void invoke(MessageContext msgContext) throws AxisFault { // If you use in-only receiver, ctx.getRelatesTo() returns null and the following line causes NPE ctx.setMessageID(ctx.getRelatesTo().getValue()); } } axis2.xml -------------- <module ref="addressing"/> <module ref="mytestmodule"/> ... <phaseOrder type="outflow"> <phase name="PolicyDetermination"/> <phase name="MessageOut"/> </phaseOrder> Hope this helps, Ali Sadik Kumlali ----- Original Message ---- From: Michael Erdely <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, August 22, 2006 9:07:03 PM Subject: [Axis2] Message Id tracking We are receiving a unique identifier within the incoming header and we want to send that same unique identifier back in the response header. How can I handle this within a module which is already processing this header block? Thanks in advance! -Michael --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
