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 vicky axis <ax...@yahoo.com> on 2005/07/22 14:32:59 UTC

[axis2] Stubborn message context...

I have 2 services named Dummy and MyService...with a few operations... A module is engaged to Dummy.. i invoke the service Dummy from a client and make the handler in the module call another service(MyService)  before passing the control to Dummy....

I do this in the invoke() part of my handler....

OMElement payload = msgContext.getEnvelope().getBody().getFirstElement();
Call call = new Call();
call.setTo(targetEPR);
call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
//Blocking invocation
OMElement result = (OMElement) call.invokeBlocking("echo", payload);
msgContext = call.getLastResponseMessage();

Though i overwrite the message context, the content.. an OMElement reflects the original status when accessed in the service(Dummy) to which the module is engaged.

Can someone please explain why this happens...

Is there any way of coping up with such stubborn messagecontexts...

Thanks in advance...

 

 

 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [axis2] Stubborn message context...

Posted by Srinath Perera <he...@gmail.com>.
Hi Vicky;

U can chnage anything inside the message context but not the message
context!, what u get is a referance .. make that refers to the other
message context object do not chnage the message context Axis2 uses.

Thanks
Srinath

On 7/22/05, vicky axis <ax...@yahoo.com> wrote:
> 
> 
> I have 2 services named Dummy and MyService...with a few operations... A
> module is engaged to Dummy.. i invoke the service Dummy from a client and
> make the handler in the module call another service(MyService)  before
> passing the control to Dummy....
> 
> I do this in the invoke() part of my handler....
> 
> OMElement payload = msgContext.getEnvelope().getBody().getFirstElement();
> Call call = new Call();
> call.setTo(targetEPR);
> call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP,
> false);
> //Blocking invocation
> OMElement result = (OMElement) call.invokeBlocking("echo", payload);
> msgContext = call.getLastResponseMessage();
> 
> Though i overwrite the message context, the content.. an OMElement reflects
> the original status when accessed in the service(Dummy) to which the module
> is engaged.
> 
> Can someone please explain why this happens...
> 
> Is there any way of coping up with such stubborn messagecontexts...
> 
> Thanks in advance...
> 
>  
> 
>  
> 
>  
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com