Reputation: 51
I have a requirement in java to digital sign the SOAP Body XML content and have decided to implement it using Apache Santuario library. The following libraries are in use.
wss4j-2.1.jar
xalan-2.7.2.jar
xmlsec-1.5.8.jar
The resultant SOAP Header should contain KeyInfo with following Secutiry elements.
<KeyInfo>
<SecurityTokenReference>
<X509Data>
<X509IssuerSerial>
<X509IssuerName>value</X509IssuerName>
<X509SerialNumber>value</X509SerialNumber>
</X509IssuerSerial>
</X509Data>
</SecurityTokenReference>
</KeyInfo>
But this api allows me to set X509Data part only under KeyInfo not directly inside SecurityTokenReference.
Please help me on how to achieve the same.
regards,
venkatram
Upvotes: 0
Views: 1015
Reputation: 1900
Look at the WSS4J unit tests, that do just that. For example:
Colm.
Upvotes: 0