WLS 8.1: Canonicalization fails signing SOAP message in DigestValue tag
(Doc ID 1140775.1)
Last updated on MAY 06, 2020
Applies to:
Oracle WebLogic Server - Version 8.1 and laterInformation in this document applies to any platform.
Symptoms
When attempting to sign the SOAP message, which is done incorrectly, following error is thrown:
...
[xxxxNTransform] : +++ inclusiveNamespaces : null
<soap:Body xmlns:soap="xxxxx"</soap:Body>
<!----- End Reference (uri=id) -- -->
+++++++ Printing computedDigest : xxx
+++++++ Printing referenceDigest : xxx
#id-2 failed reference validation: Invalid digest
at weblogic.xml.security.signature.Reference.validate(Reference.java:119)
at weblogic.xml.security.signature.SignedInfo.validateReferences(SignedInfo.java:211)
at weblogic.xml.security.signature.Signature.validateReferences(Signature.java:154)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:180)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:103)
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:130)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:256)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
weblogic.webservice.core.soap.XMLSignatureInvalidException: javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:107)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
Caused by: javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:103)
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:130)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:256)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
... 1 more
Exception in thread "main"
[xxxxNTransform] : +++ inclusiveNamespaces : null
<soap:Body xmlns:soap="xxxxx"</soap:Body>
<!----- End Reference (uri=id) -- -->
+++++++ Printing computedDigest : xxx
+++++++ Printing referenceDigest : xxx
#id-2 failed reference validation: Invalid digest
at weblogic.xml.security.signature.Reference.validate(Reference.java:119)
at weblogic.xml.security.signature.SignedInfo.validateReferences(SignedInfo.java:211)
at weblogic.xml.security.signature.Signature.validateReferences(Signature.java:154)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:180)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:103)
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:130)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:256)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
weblogic.webservice.core.soap.XMLSignatureInvalidException: javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:107)
at com.oracle.test.ValidateSoap.main(ValidateSoap.java:19)
Caused by: javax.xml.rpc.soap.SOAPFaultException: One or more references failed to validate: <Reference URI="id" />
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:103)
at weblogic.xml.security.wsse.internal.Utils.handleException(Utils.java:130)
at weblogic.xml.security.wsse.SecureSoapInputStream.addSignatureAssertions(SecureSoapInputStream.java:256)
at weblogic.xml.security.wsse.SecureSoapInputStream.getSecurityAssertions(SecureSoapInputStream.java:139)
at weblogic.webservice.core.soap.XMLSignature.validate(XMLSignature.java:102)
... 1 more
Exception in thread "main"
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |