net.aocat.psis.client.samples.verify.signature
Class XAdESSignatureEnvelopedValidationSample

java.lang.Object
  extended by net.aocat.psis.client.base.AbstractSample
      extended by net.aocat.psis.client.samples.verify.signature.XAdESSignatureEnvelopedValidationSample

public class XAdESSignatureEnvelopedValidationSample
extends AbstractSample

Java code sample for XAdES enveloped signature validation.

Author:
aalcaide

Field Summary
private  java.lang.String OUT_DIR
           
private  boolean PRINT_REQUEST
           
private  boolean PRINT_RESPONSE
           
private  boolean SAVE_REQUEST_AND_RESPONSE
           
private  java.lang.String VERIFY_REQUEST
           
private  java.lang.String VERIFY_RESPONSE
           
 
Fields inherited from class net.aocat.psis.client.base.AbstractSample
factory, log
 
Constructor Summary
XAdESSignatureEnvelopedValidationSample()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void verifyXAdESSignatureEnveloped(java.io.File docWithSignature)
          Verifies a XAdES enveloped signature.
 
Methods inherited from class net.aocat.psis.client.base.AbstractSample
isResultWellFormed, isResultWellFormed, printSaveRequest, printSaveRequest, printSaveResponse, printSaveResponse, showResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_REQUEST

private boolean PRINT_REQUEST

PRINT_RESPONSE

private boolean PRINT_RESPONSE

OUT_DIR

private java.lang.String OUT_DIR

SAVE_REQUEST_AND_RESPONSE

private boolean SAVE_REQUEST_AND_RESPONSE

VERIFY_REQUEST

private java.lang.String VERIFY_REQUEST

VERIFY_RESPONSE

private java.lang.String VERIFY_RESPONSE
Constructor Detail

XAdESSignatureEnvelopedValidationSample

public XAdESSignatureEnvelopedValidationSample()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -
Throws:
java.io.IOException

verifyXAdESSignatureEnveloped

public void verifyXAdESSignatureEnveloped(java.io.File docWithSignature)
                                   throws java.io.IOException,
                                          org.apache.xmlbeans.XmlException
Verifies a XAdES enveloped signature. Prints and/or saves request and response. Prints certificate and signature attributes. Saves updated signature to disk.

Parameters:
docWithSignature - document with signature to validate
Throws:
java.io.IOException
org.apache.xmlbeans.XmlException