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 Sebastian Roschke <se...@hpi.uni-potsdam.de> on 2007/07/03 13:03:03 UTC

Change MessageContext AND envelope in Handler

Hi,

I've got a problem concerning the MessageContext used in Axis2
MessageReceivers and Handlers. Is it possible to change members of the
message context; e.g. WSAAction? How this changes can be applied to
envelope within this message context? I tried
msgContext.getEnvelope().buildWithAttachements() but it ignores the
changes of the WSAAction member completely.

Any suggestions?

Thanks a lot for help.
Regards,
Sebastian


Re: Change MessageContext AND envelope in Handler

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Roschke wrote:
> Hi Deepal,
> 
> thanks for the answer. I know that there is no change in the envelope.
> But is there any possibility to change the envelope? Would it be
> possible to work directly within the envelope? When I get the envelope
> object, and maybe a specific part of the header as OMElement, would I be
> able to change the envelope in that way. For example:
> 
> OMElement element = msgContext.getEnvelope().getHeader().getFirstChild();
> element.setText("hallo");
> 
> Would this affect the envelope itself?

Yes !!

Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjF67jON2uBzUhh8RAqlXAKCsy47rTzF3wonDmpsHOiObX9eX0gCfcvlX
XK120M76ThiBah/+EPXOPbQ=
=R4M7
-----END PGP SIGNATURE-----

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


Re: Change MessageContext AND envelope in Handler

Posted by Sebastian Roschke <se...@hpi.uni-potsdam.de>.
Hi Deepal,

thanks for the answer. I know that there is no change in the envelope.
But is there any possibility to change the envelope? Would it be
possible to work directly within the envelope? When I get the envelope
object, and maybe a specific part of the header as OMElement, would I be
able to change the envelope in that way. For example:

OMElement element = msgContext.getEnvelope().getHeader().getFirstChild();
element.setText("hallo");

Would this affect the envelope itself?

Thanks for the help.

Regards,
Sebastian


Deepal Jayasinghe wrote:
> hi Sebastian ,
>   
>> Hi,
>>
>> I've got a problem concerning the MessageContext used in Axis2
>> MessageReceivers and Handlers. Is it possible to change members of the
>> message context; e.g. WSAAction? How this changes can be applied to
>> envelope within this message context? I tried
>> msgContext.getEnvelope().buildWithAttachements() but it ignores the
>> changes of the WSAAction member completely.
>>   
>>     
> Envelope is built using input stream , so if you change the wsa action
> there will wont be any change in the envelope.
>
> Thanks
> Deepal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>   



Re: Change MessageContext AND envelope in Handler

Posted by Deepal Jayasinghe <de...@opensource.lk>.
hi Sebastian ,
> Hi,
>
> I've got a problem concerning the MessageContext used in Axis2
> MessageReceivers and Handlers. Is it possible to change members of the
> message context; e.g. WSAAction? How this changes can be applied to
> envelope within this message context? I tried
> msgContext.getEnvelope().buildWithAttachements() but it ignores the
> changes of the WSAAction member completely.
>   
Envelope is built using input stream , so if you change the wsa action
there will wont be any change in the envelope.

Thanks
Deepal


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


Re: Change MessageContext AND envelope in Handler

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastian Roschke wrote:
> Hi,
> 
> I've got a problem concerning the MessageContext used in Axis2
> MessageReceivers and Handlers. Is it possible to change members of the
> message context; e.g. WSAAction? How this changes can be applied to
> envelope within this message context? I tried
> msgContext.getEnvelope().buildWithAttachements() but it ignores the
> changes of the WSAAction member completely. 

When you set a different WSA action, it won't touch the envelope. The
WSA action parameter within the message context is just a place holder
for WSA action. The value can come from the SOAP message, transport
headers or any other place. It is not a shortcut method to access the
WSA action within SOAP envelope.

Chinthaka
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGjF8pjON2uBzUhh8RAiHWAKCNYakMdRZPdFF3Yu9IHiEK2WENPQCbB2uO
q5PDEHDaj95e3eL1Ru0ChH4=
=HVXA
-----END PGP SIGNATURE-----

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