You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by dion ye <di...@gmail.com> on 2008/09/03 08:46:49 UTC
questions about
hi,
i meet a questions about Head Mediator. i want to add a security
information for outgoing messages , how can i add a Ws-Secuirity node to the
SOAP message as SOAP Head?
for example : the WS-Security node is :
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
<UsernameToken xmlns="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
<Username>Administrator</Username>
<Password>Password</Password>
</UsernameToken>
</wsse:Security>
and the result is :
<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
<UsernameToken xmlns="
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
">
<Username>Administrator</Username>
<Password>sa</Password>
</UsernameToken>
</wsse:Security>
</soap:Header>
<soap:Body>
........
</soap:Body>
</soap:Envelope>
Regards,
Dion
Re: questions about
Posted by dion ye <di...@gmail.com>.
thanks very much , i have write a simple custom mediator to deal with it .
:)
best regards,
Dion
On 9/3/08, indika kumara <in...@gmail.com> wrote:
>
> Hi Dion
>
> Currently with the header, you can't add nested headers. You can add
> username token or any WS security headers by enabling WS security on the out
> going path (Sample 100) and it is the best practice. By the way, you can use
> any mediator that can deal with SOAP Envelope for this. (XSLT,XQuery,Script
> mediator or even custom mediator ).
>
> Sample 150 - http://synapse.apache.org/Synapse_Samples.html#Sample100
>
> Thanks
> Indika
>
>
Re: questions about
Posted by indika kumara <in...@gmail.com>.
Hi Dion
Currently with the header, you can't add nested headers. You can add
username token or any WS security headers by enabling WS security on the out
going path (Sample 100) and it is the best practice. By the way, you can use
any mediator that can deal with SOAP Envelope for this. (XSLT,XQuery,Script
mediator or even custom mediator ).
Sample 150 - http://synapse.apache.org/Synapse_Samples.html#Sample100
Thanks
Indika