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 Dini Omar <zi...@gmail.com> on 2008/07/26 15:46:41 UTC

Example to update SOAP message before transmitting

Hi guys,

Could someone show me an example or point me to one where i can see how i
can update a soap message at runtime before Axis2/Rampart transmits the
message to the web service.

I used Wsdl2Java to generate the stubs from a wsdls file. This worked great
as i only need to specify what the payload/body is and it does the rest. Now
i would like to update the message before it is sent but i dont know how to
do it. Could someone please point me to some tutorial that shows how this is
done.

thanks

Re: Example to update SOAP message before transmitting

Posted by Eran Chinthaka <er...@gmail.com>.
Hi,

You need to write a handler, which can intercept the SOAP message. Within
Axis2, handlers should be encapsulated within modules and deployed. See here
(http://ws.apache.org/axis2/0_94/userguide4.html) for more information on
creating a simple module.

But there is a special problem in this case. If you Rampart settings
encrypts or signs your SOAP message, I don't think it will be a good idea to
touch it after that. It all depends on what you sign/encrypt.

Thanks,
EC

On Sat, Jul 26, 2008 at 6:46 AM, Dini Omar <zi...@gmail.com> wrote:

> Hi guys,
>
> Could someone show me an example or point me to one where i can see how i
> can update a soap message at runtime before Axis2/Rampart transmits the
> message to the web service.
>
> I used Wsdl2Java to generate the stubs from a wsdls file. This worked great
> as i only need to specify what the payload/body is and it does the rest. Now
> i would like to update the message before it is sent but i dont know how to
> do it. Could someone please point me to some tutorial that shows how this is
> done.
>
> thanks
>



-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada