Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleCreate ISO20022 object from Text
//For non CBPR+ Messages(pain.001.001.09)        
CustomerCreditTransferInitiation09 customerCreditTransferInitiation = new CustomerCreditTransferInitiation09();
customerCreditTransferInitiation.parseXML(xml);

//For CBPR+ Messages(pacs.008.001.08)
CbprMessage cbprMessage = new CbprMessage(new BusinessApplicationHeader02(), new FIToFICustomerCreditTransfer08());
cbprMessage.parseXml(xml);
BusinessApplicationHeader02 businessApplicationHeader02 = (BusinessApplicationHeader02) cbprMessage.getAppHdr(); 
FIToFICustomerCreditTransfer08 fiToFICustomerCreditTransfer = (FIToFICustomerCreditTransfer08) cbprMessage.getDocument();

In case you want to enclose the CBPR+ message under another Root Element, use the code below

Code Block
languagejava
themeRDark
cbprMessage.encloseCbprMessage("RequestPayload") //In case you want RequestPayload


In order to create an MT Java Object use the below code.

...