Ali,

Thanks for the solution. Just as a heads up, I had to first get a
handle to the OperationContext which makes sense after reading the
Axis architechure docs a couple times.

Inflow handler
---------------------------------------
OperationContext oCtx = mCtx.getOperationContext();
oCtx.setProperty("uid", omMessageId.getText());

Outflow handler
---------------------------------------
OperationContext oCtx = mCtx.getOperationContext();
String messageId = (String) oCtx.getProperty("uid");


-Michael



On 8/22/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
May following be the answer?

Inflow handler
----------------------
  ctx.setProperty ("INCOMING_UID", incomingId);

Outflow handler
----------------------
 String incomingId = ctx.getProperty ("INCOMING_UID");

Regards,

Ali Sadik Kumlali

----- Original Message ----
From: Michael Erdely <[EMAIL PROTECTED]>
To: [email protected]; Ali Sadik Kumlali <[EMAIL PROTECTED]>
Sent: Tuesday, August 22, 2006 11:09:22 PM
Subject: Re: [Axis2] Message Id tracking

Ali,

Thank you for the feedback but this is outside of WS-Addressing.

Can I set this String in the inflow handler's MessageContext so it is
available by the module's outflow handler?

-Michael


On 8/22/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
> 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]
>
>

---------------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to