Skip to main content

Signing with Bouncycastle Library

Signing with Apache Library

Explanation

This script provides two different methods for digitally signing SOAP messages:
  1. Bouncycastle Library: Used together with WSS4J library
  2. Apache Library: Uses Apache XML Security library
Both methods:
  • Sign SOAP message using private key and certificate
  • Create signature compliant with WS-Security standards
  • Add Security element to SOAP Header
This script should be run on the request line (Request Policy) because it uses the requestBodyTextFromClient and requestBodyTextToTargetAPI variables. Private key and certificate should be retrieved from environment variables.