Understood! So, unfortunately, hopefully someone has a solution for you. Otherwise, you may be running down the rabbit-hole of the sign-wssec.xsl as I described before.
However, with that said, you could try a hack. Disclaimer, I have no idea if this will work. You can call a stylesheet rule from GatewayScript's multi-step module:
Qualifier: If this works, 1) let us know and 2) I get full credit because I am the king of DataPower hacks!!! :-)
Original Message:
Sent: Tue September 09, 2025 07:16 AM
From: Krishna
Subject: How to use dp:sign to apply WSSec method
Dear Joseph,
The reason I am trying to use dp:sign() to sign the SOAP message in the same way that the Sign action does is because we need to sign the SOAP message within the API that we have in IBM API Connect.
We have a requirement to sign the SOAP message in API Connect, and we are trying with dp:sign() to achieve this. Please advise if there are any better options to achieve this.
------------------------------
Krishna
Original Message:
Sent: Sun September 07, 2025 10:09 PM
From: Joseph Morgan
Subject: How to use dp:sign to apply WSSec method
My advice is if you need what the sign action outputs, just use it! That's why it is there. It might mean, in your case, you have a couple of extra actions, but FWIW, I tend to use what is configurable out-of-the-box rather than write (and maintain) a bunch of code.
However, if you want to really dig in, try starting with the "store:///sign-wssec.xsl", which is, by default, what the Sign action uses. That file, though, isn't going to help terribly much, but, it includes "store:///sign-wssec-common.xsl", and then you'll find more includes on more includes.
The dp:sign() is relatively simple and the sign action is far more complex (Just toggle the "Basic" to go to advanced on the new UI, or go to the advanced tab on the old UI to see what I'm talking about). On the Sign action, the header policy is strict. You'll find how it handles that somewhere in all those includes.
------------------------------
Joseph Morgan
CEO - Independent
Original Message:
Sent: Sun September 07, 2025 05:51 AM
From: Krishna
Subject: How to use dp:sign to apply WSSec method
Hello All,
I am working with dp:sign() to digitally sign a SOAP request, but the output of the signed message is not the same as when we sign the message using the sign action. How can we ensure that the signature is included in the WS-Security header when using dp:sign()?
I would appreciate any guidance, sample XSLT, or references that can help.
------------------------------
Krishna
------------------------------