Search in sources :

Example 1 with X509IssuerSerialType

use of com.axelor.apps.account.ebics.schema.xmldsig.X509IssuerSerialType in project axelor-open-suite by axelor.

the class EbicsXmlFactory method createX509DataType.

/**
 * Creates a new <code>X509DataType</code> XML object
 *
 * @param x509SubjectName the subject name
 * @param x509Certificate the certificate
 * @return the <code>X509DataType</code> XML object
 */
public static X509DataType createX509DataType(String x509SubjectName, byte[] x509Certificate, String x509IssuerName, BigInteger x509SerialNumber) {
    X509DataType newX509DataType = X509DataType.Factory.newInstance();
    newX509DataType.setX509SubjectNameArray(new String[] { x509SubjectName });
    newX509DataType.setX509CertificateArray(new byte[][] { x509Certificate });
    X509IssuerSerialType x509IssuerSerialType = X509IssuerSerialType.Factory.newInstance();
    x509IssuerSerialType.setX509IssuerName(x509IssuerName);
    x509IssuerSerialType.setX509SerialNumber(x509SerialNumber);
    X509IssuerSerialType[] x509IssuerSerialTypes = { x509IssuerSerialType };
    newX509DataType.setX509IssuerSerialArray(x509IssuerSerialTypes);
    return newX509DataType;
}
Also used : X509DataType(com.axelor.apps.account.ebics.schema.xmldsig.X509DataType) X509IssuerSerialType(com.axelor.apps.account.ebics.schema.xmldsig.X509IssuerSerialType)

Aggregations

X509DataType (com.axelor.apps.account.ebics.schema.xmldsig.X509DataType)1 X509IssuerSerialType (com.axelor.apps.account.ebics.schema.xmldsig.X509IssuerSerialType)1