Id attribute is missing at <ds:SignedInfo>

221 views Asked by At

We signing the XML with below code , but we missing ID attribute in many place like SignedInfo and Object Tags

Please help us to rectify the code. ........... XadesSigningProfile p = new XadesBesSigningProfile(kp) .withBasicSignatureOptionsProvider(new extentProvider()) .withAlgorithmsProviderEx(new AlgProviderEx()); XadesSigner signer = p.newSigner();

......... DataObjectDesc obj1 = new DataObjectReference(refUri) .withTransform(new EnvelopedSignatureTransform()) .withDataObjectFormat(new DataObjectFormatProperty("text/xml","" ).withDescription("contenido comprobante")); ..... signer.sign(obj1 ,objContent);

1

There are 1 answers

0
lgoncalves On

XAdEs4j handles the generation of the Ids automatically as needed for the internal references. All the required IDs should be added. Do you need to reference those elements externally?