Safelayer Secure Communications
 
 
Search
Home arrow SOAP Axis arrow Generation of XML Signature with Time-Stamp


TeleTrust Innovation Price

Innovation Award
for TrustedX 2007

The European ICT Price. Nominee

for TrustedX 2007

Safelayer Labs
 
Try

Axis examples

Generation of XML Signature with Time-Stamp Print E-mail
21 January 2008

The objective of this example is to produce a signature in an XML document with a time-stamp, using the TrustedX signature service. In order to understand this example, it is recommended that first you understand the previously seen example: XML Signature Generation.

To try this example, you must download the file called sampleAxis4.zip and follow the instructions in Configuration of the Environment.

This example has a similar structure to the XML Signature Generation example, but with two small differences.

Firstly, the format of the returned signature is enveloping i.e. the document will be inside the generated signature. This parameter is included inside the OptionalInputs object and creates a new enveloping signature with the setEnvelopingSignature() method.

opt.setEnvelopingSignature(new EnvelopingSignature());

And finally, considering that the signature must have a time-stamp, the request must indicate that the format of the signature will be ES-T.

opt.setSignatureForm(SignatureFormType.fromValue(new URI(SIGN_TYPE_EST)));

Again, the request must be sent to the TrustedX service, and, if all goes well, it will be possible to retrieve the XML signature in a file called DemoSignedEnvelopingTS.xml.