use of com.axelor.apps.account.ebics.schema.h003.EbicsRequestDocument in project axelor-open-suite by axelor.
the class EbicsXmlFactory method createEbicsRequestDocument.
// -----------------------------------------------------------------------------------------------------------------------------------------------
/**
* Creates a new <code>EbicsRequestDocument</code> XML object
*
* @param ebicsRequest the <code>EbicsRequest</code> element
* @return the <code>EbicsRequestDocument</code> XML object
*/
public static EbicsRequestDocument createEbicsRequestDocument(EbicsRequest ebicsRequest) {
EbicsRequestDocument newEbicsRequestDocument = EbicsRequestDocument.Factory.newInstance();
newEbicsRequestDocument.setEbicsRequest(ebicsRequest);
return newEbicsRequestDocument;
}
use of com.axelor.apps.account.ebics.schema.h003.EbicsRequestDocument in project axelor-open-suite by axelor.
the class ReceiptRequestElement method build.
@Override
public void build() throws AxelorException {
EbicsRequest request;
Header header;
Body body;
MutableHeaderType mutable;
StaticHeaderType xstatic;
TransferReceipt transferReceipt;
SignedInfo signedInfo;
mutable = EbicsXmlFactory.createMutableHeaderType("Receipt", null);
xstatic = EbicsXmlFactory.createStaticHeaderType(session.getBankID(), transactionId);
header = EbicsXmlFactory.createEbicsRequestHeader(true, mutable, xstatic);
transferReceipt = EbicsXmlFactory.createTransferReceipt(true, 0);
body = EbicsXmlFactory.createEbicsRequestBody(transferReceipt);
request = EbicsXmlFactory.createEbicsRequest(1, "H003", header, body);
document = EbicsXmlFactory.createEbicsRequestDocument(request);
signedInfo = new SignedInfo(session.getUser(), getDigest());
signedInfo.build();
((EbicsRequestDocument) document).getEbicsRequest().setAuthSignature(signedInfo.getSignatureType());
((EbicsRequestDocument) document).getEbicsRequest().getAuthSignature().setSignatureValue(EbicsXmlFactory.createSignatureValueType(signedInfo.sign(toByteArray())));
}
Aggregations