rajnaresh_kumar
10 years agoOccasional Visitor
How to generate Signature without the Id attribute?
How to generate Signature without the Id attribute?
Right now I have a Soap request something like this
.... <ds:Signature Id="SIG-576AE66DA61A4B367314454649084935" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="wsa soapenv urn" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><ds:Reference URI="#id-576AE66DA61A4B367314454649084844"><ds:Transforms><ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><ec:InclusiveNamespaces PrefixList="urn" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>....
Becuase of the Id attribute I am getting the below error
javax.xml.crypto.URIReferenceException: com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID id-576AE66DA61A4B367314454661142979
I think if I can remove the Id attribute while generating the soap request then the request should pass. Any thoughts on how to remove the attribute??
My Signature settings