1. I have an XML Payload to sign it using the certificate.
2. Currently using the service pub.security.xml:signXML to sign the XML.
3. The payload that i need to sign is located with the below tag
<vog.li:Data DataEncodingType="base64" MimeType="text/xml"> **Data to Sign** </vog.li:Data>
4. After i sign my payload i don't get to see the below tag which is Reference URI
/SignedRoot/Signature/SignedInfo/Reference (URI value)
its empty technically <Reference URI="">
Hi @srinivasan.ravikumar2 ,
pub.security.xml:signXML has the optional inputs nodeSelectors which lets you specify the XPath notation that identifies the nodes to be signed,
The generated signature can be placed in a specific position using the input signatureNodeSelector. Please check if using these inputs works for you.
The full documentation for this built-in service is at pub.security.xml:signXML built in services reference
Here is the solution for it. To get the URI, schema location should be provided having Id attribute in it.
• Create an XSD for the input XML and provide Id attribute as Type ID.
• Set input schemaLocation to NameSpace URI and schema location as key value pair
• Provide uri value as #IdValue to appear in reference URI output (this should be with respect to node selector)
• Select the Node to encrypt. uri value should match this node Id attribute value
• Above is valid for isEveloping=true. Else you need to pass this value idXmlObject variable