You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Shaoguang Cong <sc...@yahoo.com> on 2007/04/24 18:11:30 UTC

[AXIS2] Problem with MessageContext

  On server side, I use a request and a response handler to log some data. 
  In the request handler, I called messageContext.setProperty("myProperty", "xyz"). 
  In the response handler, messageContext.getProperty("myProperty") returns null. 
  It looks the properties in MessageContext (Options) are reset after invoking the web service.
   
  Should the messageContext carry around the custom properties through all server-side handlers?
   
  Shaoguang

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: [AXIS2] Problem with MessageContext

Posted by Shaoguang Cong <sc...@yahoo.com>.
Thanks, Deepal.  I changed to set the property in OperationConetxt and it works.
  I noticed the OperationContext is copied from the in to the out memssageContext.
   
  Shaoguang

Deepal Jayasinghe <de...@opensource.lk> wrote:
  Hi Shaoguang ,

Yes , you can not store property in req message context and access them
using response message context. If you want to do so , then you need to
store the property in OperationConetxt not in the message context.

There will be two fresh message context for one in-out mep.

Thanks
Deepal

> On server side, I use a request and a response handler to log some data.
> In the request handler, I called
> messageContext.setProperty("myProperty", "xyz").
> In the response handler, messageContext.getProperty("myProperty")
> returns null.
> It looks the properties in MessageContext (Options) are reset after
> invoking the web service.
> 
> Should the messageContext carry around the custom properties through
> all server-side handlers?
> 
> Shaoguang
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

Re: [AXIS2] Problem with MessageContext

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi  Shaoguang ,

Yes , you can not store property in req message context and access them
using response message context. If you want to do so , then you need to
store the property in OperationConetxt not in the message context.

There will be two fresh message context for one in-out mep.

Thanks
Deepal

> On server side, I use a request and a response handler to log some data.
> In the request handler, I called
> messageContext.setProperty("myProperty", "xyz").
> In the response handler, messageContext.getProperty("myProperty")
> returns null.
> It looks the properties in MessageContext (Options) are reset after
> invoking the web service.
>  
> Should the messageContext carry around the custom properties through
> all server-side handlers?
>  
> Shaoguang
>
> ------------------------------------------------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check out new cars at Yahoo! Autos.
> <http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org