javasoapuiwss4j

Signature & Digest value mismatch Java vs SOAP UI for same request body as input


I have signed soap request by following below stackoverflow URL.

Signing soap message using WSS4j in Java

The signed soap request generated from Java code and the one generated from SOUP UI for same input is not matching.

Below listed have different values.

1) PrefixList of inclusivenamespace tag

("#default SOAP-ENV #default SOAP-ENV" in case of SOAP UI vs "SOAP-ENV SOAP-ENV" in case of Java code)

2) digest value

3) signature value

Does PrefixList has any impact on digest and signiture value?

If so, how can I set prefixlist attribute from java code.

This is major blocker for me. Please help. Thanks in advance.


Solution

  • The issue was with canonization. I canonicalized input xml using below URL

    http://www.soapclient.com/XMLCanon.html

    Just used canonicalized XML as a input to java code. It worked !!