Here you can find the solution for a problem: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR exception
When you invoke a webservice you got the exception like below:
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
There is a bug in the wss4j-ws-security-dom library in version 2.2.0 which might be delivered as dependency by SpringBoot freamework.
As as solution you can override the wss4j-ws-security-dom library dependency to hogher version forthe time it will be included in proepr vesiona as SpringBoot dependency. For do this – just open pom.xml file and add the followinf depenency.
<dependency> <groupId>org.apache.wss4j</groupId> <artifactId>wss4j-ws-security-dom</artifactId> <version>2.2.2</version> </dependency>