use of com.axelor.apps.account.ebics.schema.h003.EbicsRequestDocument.EbicsRequest.Body.TransferReceipt in project axelor-open-suite by axelor.
the class EbicsXmlFactory method createTransferReceipt.
/**
* Create the <code>TransferReceipt</code> XML object
*
* @param authenticate should authenticate?
* @param receiptCode the receipt code
* @return the <code>TransferReceipt</code> XML object
*/
public static TransferReceipt createTransferReceipt(boolean authenticate, int receiptCode) {
TransferReceipt newTransferReceipt = TransferReceipt.Factory.newInstance();
newTransferReceipt.setAuthenticate(authenticate);
newTransferReceipt.setReceiptCode(receiptCode);
return newTransferReceipt;
}
use of com.axelor.apps.account.ebics.schema.h003.EbicsRequestDocument.EbicsRequest.Body.TransferReceipt 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