0

I need to sign different part of a SOAP envelope. Can this be done by calling the WL.Server.signSoapMessage api multiple times with different values for the second parameter, namely the tag id.

I notice that when I call this api the second time for a different tag id. it adds a new wsse:Security stanza instead of inserting the signature into the already created wsse:Security stanza as a result of the first call to the api.

Any pointers?

1 Answers1

0

No, the WL.Server.signSoapMessage api only supports the signing of a single XML element within the Envelope. And as you discovered, calling it multiple times will add an additional wsse:Security header each time you call it.

One approach if you need to sign multiple elements would be to write some Java code to do the signing of multiple elements (leveraging the wssecurity api library of your choice).

And then call out to your Java code from within the adapter:

http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/topic/com.ibm.worklight.help.doc/devref/t_calling_java_code_from_a_javas.html

billdodd
  • 206
  • 1
  • 3