Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent owner document #171

Open
lorenzobenvenuti opened this issue Feb 5, 2021 · 0 comments · May be fixed by #173
Open

Inconsistent owner document #171

lorenzobenvenuti opened this issue Feb 5, 2021 · 0 comments · May be fixed by #173
Assignees

Comments

@lorenzobenvenuti
Copy link

lorenzobenvenuti commented Feb 5, 2021

Hi,

I'm facing an issue that looks very similar to the one mentioned here and fixed in version 2.0.0. After migrating an application from Java 8 to Java 11, some tests were failing due to an invalid XML signature; I came across the above issue, so I've tried to update the saaj version to 2.0.0 and this solved some of our use cases except one: when the SOAPMessage is updated using wss4j then the signature is invalid, and it looks like it's happening for the same reason of the other issue: nodes have a different owner document, and this causes CanonicalizerBase#canonicalizeSubTree to include the Signature element when computing the signature. It could be a wss4j bug, but it's not happening in JDK8 or JDK11 with saaj < 1.4; also, from what I understand, wss4j is using standard DOM API to manipulate the message.

I'm attaching a project including all our use cases (load a SoapMessage from a string, build a SOAPMessage using DOM API, update a SOAPMessage using wss4j)

  • JDK8: signature is valid for any use case
  • JDK11, saaj < 1.4: signature is valid for any use case
  • JDK11, saaj >= 1.4 and < 2, signature is invalid for all the use cases (see Element owner document is inconsistent within SOAP document #165)
  • JDK11, saaj >= 2: signature is valid when the SOAPMessage is loaded from a string or updated using the DOM API; it's not valid when the message is updated using wss4j (also based on DOM API)

Thanks,

lorenzo

lukasj added a commit to lukasj/metro-saaj that referenced this issue Feb 26, 2021
@lukasj lukasj linked a pull request Feb 26, 2021 that will close this issue
lukasj added a commit to lukasj/metro-saaj that referenced this issue Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants