According to the schema, the Signature Element is a SignatureType: <element name="Signature" type="ds:SignatureType"/>
and the SignatureType is available in the bindings directory: https://github.com/apache/santuario-java/blob/trunk/src/main/java/org/apache/xml/security/binding/xmldsig/SignatureType.java The JAXB bindings are used by the streaming XML Security implementation, and are not designed to be used in a standalone way. You might be able to re-use the streaming code for your purpose though. Take a look at some of the tests, for example: https://github.com/apache/santuario-java/blob/trunk/src/test/java/org/apache/xml/security/test/stax/signature/SignatureVerificationTest.java Colm. On Tue, Jul 17, 2018 at 10:49 AM, buko <[email protected]> wrote: > > > We’d like to start with a JAXB object (Document) and then serialize and > sign it into a new JAXB object (SignedDocument). Then we’d like to embed > the SignedDocument into another object (Message) and sign that to produce a > new JAXB object (SignedMessage). > > > > We can create the secure XMLStreamWriter easily enough and sign the > document easily enough but it’s not clear how we actually read the > generated signature back using JAXB. > > > > What’s interesting is Santuario appears to contain JAXB bindings for the > XML Signature Schema in https://github.com/apache/ > santuario-java/tree/trunk/src/main/java/org/apache/xml/ > security/binding/xmldsig. But there’s no binding for the ‘Signature’ > element. > > > > Any ideas here? Is this possible? Is there a test that shows how to use > the JAXB bindings? > > > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
