On Aug 29, 2012, at 2:50 PM, "Smith, Mitchell" <[email protected]> wrote:

> Hi,
> 
> I have a requirement to add a XML digital signature to soap requests in my
> client.
> 
> The service provider has chosen to not use WS-Security, but instead insist
> on a XML digital signature, being added to the soap request (I have no idea
> why)
> 
> Is there anyway, I can use interceptors or transformers, to then sign the
> the RAW XML of the SOAP request once formatted prior to sending this to the
> server?

The easiest way to do this is likely to just mimic what the WSS4J stuff does 
for WS-Security.  Basically write a couple interceptors that would:

1) Make sure the SAAJOutInterceptor is on the chain.   This causes the output 
to build up into a DOM/SAAJ model

2) Just before the SAAJOut's ending interceptor, grab the DOM and use Santuario 
(or whatever other XML sig library you want) to sign the DOM.

3) Let the SAAJOut thing then write it out to the stream.



Dan



> 
> Thanks
> 
> -- 
> *Mitchell
> *
> 
> The information contained in this email (and any attachments) is confidential 
> and may be privileged. If you are not the intended recipient
> and have received this email in error, please notify the sender immediately 
> by reply email and delete the message and any attachments.
> If you are not the named addressee, you must not copy, disclose, forward or 
> otherwise use the information contained in this email.
> Cable & Wireless Communications Plc and its affiliates reserve the right to 
> monitor all email communications through their networks to
> ensure regulatory compliance.
> 
> Cable & Wireless Communications Plc is a company registered in England & 
> Wales with number:
> 07130199 and offices located at 3rd Floor, 26 Red Lion Square, London WC1R 4HQ

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to