Commit 5c9c19bf by zhanghou

192,292,196,296基本域的mx转mt格式完成

parent 7d7472e9
......@@ -7,9 +7,9 @@
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="swiftMt" />
<module name="swiftMx" />
<module name="swiftCore" />
<module name="swiftMt" />
</profile>
</annotationProcessing>
</component>
......
......@@ -16,5 +16,10 @@
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
</component>
</project>
\ No newline at end of file
......@@ -31,6 +31,14 @@ public class Mx2MtConstants {
public static final String MT_TYPE_202 = "202";
public static final String MT_TYPE_192 = "192";
public static final String MT_TYPE_292 = "292";
public static final String MT_TYPE_196 = "196";
public static final String MT_TYPE_296 = "296";
public static final String OUT_PUT_FILE_PATH = "outPutFilePath";
public static final String MX_OBJECT = "mxObj";
......
......@@ -3,6 +3,8 @@ package com.brilliance.swift.mx2mt;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.mt103.Mx2Mt103Creator;
import com.brilliance.swift.mx2mt.mt192292.Mx2Mtn92Creator;
import com.brilliance.swift.mx2mt.mt196296.Mx2Mtn96Creator;
import com.brilliance.swift.mx2mt.mt202cov202.Mx2Mt202Creator;
import com.brilliance.swift.mx2mt.mt900910.Mx2Mt900910Creator;
import com.brilliance.swift.mx2mt.mt940950.Mx2Mt940950Creator;
......@@ -70,6 +72,10 @@ public class Mx2MtCreatorManager {
return new Mx2Mt900910Creator();
} else if("camt.053.001".equals(messageType)){
return new Mx2Mt940950Creator();
} else if("camt.056.001".equals(messageType)){
return new Mx2Mtn92Creator();
} else if("camt.029.001".equals(messageType)){
return new Mx2Mtn96Creator();
}
else {
throw new SwiftException("Invalid message type");
......
package com.brilliance.swift.mx2mt.mt192292;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtCreator;
import com.brilliance.swift.mx2mt.Mx2MtContextIdentifier;
import com.brilliance.swift.mx2mt.Mx2MtTagsGenerate;
import com.brilliance.swift.mx2mt.mt192292.impl.Field11SGenerate;
import com.brilliance.swift.mx2mt.mt192292.impl.Field20Generate;
import com.brilliance.swift.mx2mt.mt192292.impl.Field21Generate;
import com.brilliance.swift.mx2mt.mt192292.impl.Field79Generate;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.util.XmlUtil;
import com.prowidesoftware.swift.model.SwiftBlock3;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import org.dom4j.Document;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Mx2Mtn92Creator extends AbstractMx2MtCreator {
@Override
public void preProcess() {
super.preProcess();
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
context.set(Mx2MtContextIdentifier.APPHDR_PARENT_ELEMENT_NAME, parentElementMaps.get("AppHdr"));
context.set(Mx2MtContextIdentifier.GRPHDR_PARENT_ELEMENT_NAME, parentElementMaps.get("GrpHdr"));
context.set(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, parentElementMaps.get("FIToFIPmtCxlReq"));
}
@Override
public void withBlock3() throws SwiftException {
super.withBlock3();
SwiftBlock3 block3 = context.get(SwiftMessage.class).getBlock3();
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
String bodyParentPath = (String)context.get(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, true);
String uetr = getXmlNodeValue(bodyParentPath, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlUETR");
if (StringUtil.isNotEmpty(uetr)) {
block3.getTags().add(new Tag("121", uetr));
}
}
@Override
public List<Mx2MtTagsGenerate> getGenerateTagList() {
List<Mx2MtTagsGenerate> fieldsGenerateList = new ArrayList<>();
fieldsGenerateList.add(new Field11SGenerate());
fieldsGenerateList.add(new Field20Generate());
fieldsGenerateList.add(new Field21Generate());
fieldsGenerateList.add(new Field79Generate());
return fieldsGenerateList;
}
@Override
protected String getMtType() {
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
String bodyParentPath = (String)context.get(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, true);
String mtType = getXmlNodeValue(bodyParentPath, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlGrpInf.OrgnlMsgNmId");
String msgType = "";
if(StringUtil.isNotEmpty(mtType)){
if(mtType.startsWith("pacs.008")){
msgType = "103";
}else if(mtType.startsWith("pacs.003")){
msgType = "104";
}else if(mtType.startsWith("pacs.009")){
msgType = "202";
}else if(mtType.startsWith("pacs.010")){
msgType = "204";
}else if(mtType.matches("/MT10[0-9]{1}/")){
msgType = mtType.substring(2);
}else if(mtType.matches("/MT20[0-9]{1}/")){
msgType = mtType.substring(2);
}else {
msgType = "202";
}
}
if (msgType.startsWith("1")) {
return Mx2MtConstants.MT_TYPE_192;
} else if(msgType.startsWith("2")){
return Mx2MtConstants.MT_TYPE_292;
}else {
return "类型错误";
}
}
}
package com.brilliance.swift.mx2mt.mt192292.impl;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*
*/
public class Field11SGenerate extends AbstractMx2MtTagsGenerate {
private static String name = "11S";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String orgnlMsgNmId = "";
String date = "";
String mtType = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlGrpInf.OrgnlMsgNmId");
String dateStr = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlGrpInf.OrgnlCreDtTm");
if (StringUtil.isNotEmpty(mtType)) {
orgnlMsgNmId = getMtMsg(mtType);
}
if(StringUtil.isNotEmpty(dateStr)){
date = mXToMTDate(dateStr);
}
tags.add(new Tag(name, orgnlMsgNmId+Mx2MtConstants.NEW_LINE+date));
}
}
package com.brilliance.swift.mx2mt.mt192292.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*/
public class Field20Generate extends AbstractMx2MtTagsGenerate {
private static String name = "20";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String messageId = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.Case.Id");
if (StringUtil.isNotEmpty(messageId)) {
tags.add(new Tag(name, messageId));
}
}
}
package com.brilliance.swift.mx2mt.mt192292.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*/
public class Field21Generate extends AbstractMx2MtTagsGenerate {
private static String name = "21";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String orgnlInstrId = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlInstrId ");
if (StringUtil.isNotEmpty(orgnlInstrId)) {
tags.add(new Tag(name, orgnlInstrId));
}
}
}
package com.brilliance.swift.mx2mt.mt192292.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.NumberUtil;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.math.BigDecimal;
import java.util.List;
/**
*/
public class Field79Generate extends AbstractMx2MtTagsGenerate {
private static String name_79 = "79";
private static String name_32A = "32A";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String uetr = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlUETR");
String filed79 = mXToMT79CANC(uetr, "FIToFIPmtCxlReq.Undrlyg.TxInf.CxlRsnInf");
if (StringUtil.isNotEmpty(filed79)) {
tags.add(new Tag(name_79, filed79));
String dt = "";
String amt = "";
String ccy = "";
String dateStr = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlIntrBkSttlmDt");
dt = mXToMTDate(dateStr);
String amtStr = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlIntrBkSttlmAmt");
String ccyStr = getXmlNodeValue(bodyHdrParentElementName, document, "FIToFIPmtCxlReq.Undrlyg.TxInf.OrgnlIntrBkSttlmAmt@Ccy");
if (StringUtil.isNotEmpty(amtStr)&&StringUtil.isNotEmpty(ccyStr)) {
amt = NumberUtil.formatAmt(new BigDecimal(amtStr), ccyStr);
ccy = ccyStr;
tags.add(new Tag(name_32A, dt+ccy+amt));
}
}
}
}
package com.brilliance.swift.mx2mt.mt196296;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtCreator;
import com.brilliance.swift.mx2mt.Mx2MtContextIdentifier;
import com.brilliance.swift.mx2mt.Mx2MtTagsGenerate;
import com.brilliance.swift.mx2mt.mt196296.impl.Field11RGenerate;
import com.brilliance.swift.mx2mt.mt196296.impl.Field20Generate;
import com.brilliance.swift.mx2mt.mt196296.impl.Field21Generate;
import com.brilliance.swift.mx2mt.mt196296.impl.Field76Generate;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.util.XmlUtil;
import com.prowidesoftware.swift.model.SwiftBlock3;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import org.dom4j.Document;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class Mx2Mtn96Creator extends AbstractMx2MtCreator {
@Override
public void preProcess() {
super.preProcess();
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
context.set(Mx2MtContextIdentifier.APPHDR_PARENT_ELEMENT_NAME, parentElementMaps.get("AppHdr"));
context.set(Mx2MtContextIdentifier.GRPHDR_PARENT_ELEMENT_NAME, parentElementMaps.get("GrpHdr"));
context.set(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, parentElementMaps.get("RsltnOfInvstgtn"));
}
@Override
public void withBlock3() throws SwiftException {
super.withBlock3();
SwiftBlock3 block3 = context.get(SwiftMessage.class).getBlock3();
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
String bodyParentPath = (String)context.get(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, true);
String uetr = getXmlNodeValue(bodyParentPath, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlUETR");
if (StringUtil.isNotEmpty(uetr)) {
block3.getTags().add(new Tag("121", uetr));
}
}
@Override
public List<Mx2MtTagsGenerate> getGenerateTagList() {
List<Mx2MtTagsGenerate> fieldsGenerateList = new ArrayList<>();
fieldsGenerateList.add(new Field11RGenerate());
fieldsGenerateList.add(new Field20Generate());
fieldsGenerateList.add(new Field21Generate());
fieldsGenerateList.add(new Field76Generate());
return fieldsGenerateList;
}
public String getMtMsg() {
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
String bodyParentPath = (String)context.get(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, true);
String mtType = getXmlNodeValue(bodyParentPath, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlMsgNmId");
if(StringUtil.isNotEmpty(mtType)){
if("pacs.008".equals(mtType)){
return "103";
}else if("pacs.003".equals(mtType)){
return "104";
}else if("pacs.009".equals(mtType)){
return "202";
}else if("pacs.010".equals(mtType)){
return "204";
}else if(mtType.matches("/MT10[0-9]{1}/")){
return mtType.substring(2);
}else if(mtType.matches("/MT20[0-9]{1}/")){
return mtType.substring(2);
}else {
return "202";
}
}else {
return "没有找到指定的类型";
}
}
@Override
protected String getMtType() {
Document document = (Document)context.get(Mx2MtContextIdentifier.MX_XMl_DOCUMENT, true);
String bodyParentPath = (String)context.get(Mx2MtContextIdentifier.BODY_PARENT_ELEMENT_NAME, true);
String mtType = getXmlNodeValue(bodyParentPath, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlMsgNmId");
String msgType = "";
if(StringUtil.isNotEmpty(mtType)){
if(mtType.startsWith("pacs.008")){
msgType = "103";
}else if(mtType.startsWith("pacs.003")){
msgType = "104";
}else if(mtType.startsWith("pacs.009")){
msgType = "202";
}else if(mtType.startsWith("pacs.010")){
msgType = "204";
}else if(mtType.matches("/MT10[0-9]{1}/")){
msgType = mtType.substring(2);
}else if(mtType.matches("/MT20[0-9]{1}/")){
msgType = mtType.substring(2);
}else {
msgType = "202";
}
}
if (msgType.startsWith("1")) {
return Mx2MtConstants.MT_TYPE_196;
} else if(msgType.startsWith("2")){
return Mx2MtConstants.MT_TYPE_296;
}else {
return "类型错误";
}
}
}
package com.brilliance.swift.mx2mt.mt196296.impl;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*
*/
public class Field11RGenerate extends AbstractMx2MtTagsGenerate {
private static String name = "11R";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String orgnlMsgNmId = "";
String date = "";
String mtType = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlMsgNmId");
String dateStr = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlGrpInf.OrgnlCreDtTm");
if (StringUtil.isNotEmpty(mtType)) {
orgnlMsgNmId = getMtMsg(mtType);
}
if(StringUtil.isNotEmpty(dateStr)){
date = mXToMTDate(dateStr);
}
tags.add(new Tag(name, orgnlMsgNmId+Mx2MtConstants.NEW_LINE+date));
}
}
package com.brilliance.swift.mx2mt.mt196296.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*/
public class Field20Generate extends AbstractMx2MtTagsGenerate {
private static String name = "20";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String messageId = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.CxlStsId");
if (StringUtil.isNotEmpty(messageId)) {
tags.add(new Tag(name, messageId));
}
}
}
package com.brilliance.swift.mx2mt.mt196296.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*/
public class Field21Generate extends AbstractMx2MtTagsGenerate {
private static String name = "21";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String orgnlInstrId = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.RslvdCase.Id");
if (StringUtil.isNotEmpty(orgnlInstrId)) {
tags.add(new Tag(name, orgnlInstrId));
}
}
}
package com.brilliance.swift.mx2mt.mt196296.impl;
import com.brilliance.swift.exception.SwiftException;
import com.brilliance.swift.mx2mt.AbstractMx2MtTagsGenerate;
import com.brilliance.swift.util.StringUtil;
import com.prowidesoftware.swift.model.SwiftMessage;
import com.prowidesoftware.swift.model.Tag;
import java.util.List;
/**
*/
public class Field76Generate extends AbstractMx2MtTagsGenerate {
private static String name_76 = "76";
private static String name_77A = "77A";
@Override
public void tagGenerate() throws SwiftException {
SwiftMessage swiftMessage = context.get(SwiftMessage.class);
List<Tag> tags = swiftMessage.getBlock4().getTags();
String uetr = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.OrgnlUETR");
String sts = getXmlNodeValue(bodyHdrParentElementName, document, "RsltnOfInvstgtn.Sts.Conf");
List<String> list = mXToMT76RCANC(sts,uetr, "RsltnOfInvstgtn.CxlDtls.TxInfAndSts.CxlStsRsnInf");
if(list.size()>0&&StringUtil.isNotEmpty(list.get(0))){
tags.add(new Tag(name_76, list.get(0)));
if(StringUtil.isNotEmpty(list.get(1))){
tags.add(new Tag(name_77A, list.get(1)));
}
}
}
}
package com.brilliance.swift.vo;
import com.brilliance.swift.vo.common.CcyFormatAmount;
import com.brilliance.swift.vo.common.TransactionReference;
import java.util.Date;
/**
* @author zh
* @create 2022-05-26 17:12
*/
public class FIToFIPaymentCancellationRequest extends SwiftDto{
protected TransactionReference txnRef;
protected String OrgnlMsgNmId;
protected Date date;
protected Date valueDate;
protected CcyFormatAmount valueAmount;
protected String cancellationReasonInformation;
public TransactionReference getTxnRef() {
return txnRef;
}
public void setTxnRef(TransactionReference txnRef) {
this.txnRef = txnRef;
}
public String getOrgnlMsgNmId() {
return OrgnlMsgNmId;
}
public void setOrgnlMsgNmId(String orgnlMsgNmId) {
OrgnlMsgNmId = orgnlMsgNmId;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public Date getValueDate() {
return valueDate;
}
public void setValueDate(Date valueDate) {
this.valueDate = valueDate;
}
public CcyFormatAmount getValueAmount() {
return valueAmount;
}
public void setValueAmount(CcyFormatAmount valueAmount) {
this.valueAmount = valueAmount;
}
public String getCancellationReasonInformation() {
return cancellationReasonInformation;
}
public void setCancellationReasonInformation(String cancellationReasonInformation) {
this.cancellationReasonInformation = cancellationReasonInformation;
}
}
package com.brilliance.swift.vo;
import com.brilliance.swift.vo.common.CcyFormatAmount;
import com.brilliance.swift.vo.common.TransactionReference;
import java.util.Date;
/**
* @author zh
* @create 2022-05-26 17:16
*/
public class ResolutionOfInvestigation extends SwiftDto{
protected TransactionReference txnRef;
protected String OrgnlMsgNmId;
protected Date date;
protected String cancellationStatusReasonInformation;
public TransactionReference getTxnRef() {
return txnRef;
}
public void setTxnRef(TransactionReference txnRef) {
this.txnRef = txnRef;
}
public String getOrgnlMsgNmId() {
return OrgnlMsgNmId;
}
public void setOrgnlMsgNmId(String orgnlMsgNmId) {
OrgnlMsgNmId = orgnlMsgNmId;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getCancellationStatusReasonInformation() {
return cancellationStatusReasonInformation;
}
public void setCancellationStatusReasonInformation(String cancellationStatusReasonInformation) {
this.cancellationStatusReasonInformation = cancellationStatusReasonInformation;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
THE MESSAGE WILL WORK “AS IS” IN THE READINESS PORTAL. IT IS ESSENTIAL THAT USERS REMOVE THE ENVELOPE AND REPLACE IT WITH THEIR OWN TRANSPORT HEADER (FOR EXAMPLE FOR ALLIANCE ACCESS YOU WOULD USE THE XML V2 HEADERS).
=========================================================================================================================================================================================
SWIFT © 2020. All rights reserved.
This publication contains SWIFT or third-party confidential information. Do not disclose this publication outside your organisation without SWIFT’s prior written consent.
The use of this document is governed by the legal notices appearing at the end of this document. By using this document, you will be deemed to have accepted those legal notices.
====================================================================================================================================================================
Use Case c.56.1.1 Agent C Danske Bank sends a camt.029 to Agent B Nordea Finland
=============================================================================================================================
Change Log
2020-10-16 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../March21Schemas/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fr>
<FIId>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt029bizmsgidr-002</BizMsgIdr>
<MsgDefIdr>camt.029.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T16:15:00+01:00</CreDt>
<Rltd>
<Fr>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt029bizmsgidr-002</BizMsgIdr>
<MsgDefIdr>camt.056.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T12:15:00+01:00</CreDt>
</Rltd>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.029.001.09">
<RsltnOfInvstgtn>
<Assgnmt>
<Id>ASSNID-001</Id>
<Assgnr>
<Agt>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgnr>
<Assgne>
<Agt>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgne>
<CreDtTm>2021-02-17T16:15:00+01:00</CreDtTm>
</Assgnmt>
<Sts>
<Conf>CNCL</Conf>
</Sts>
<CxlDtls>
<TxInfAndSts>
<CxlStsId>CNCL-ID001</CxlStsId>
<RslvdCase>
<Id>CSE-001</Id>
<Cretr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Cretr>
</RslvdCase>
<OrgnlGrpInf>
<OrgnlMsgId>pacs8bizmsgidr01</OrgnlMsgId>
<OrgnlMsgNmId>pacs.008.001.08</OrgnlMsgNmId>
<OrgnlCreDtTm>2021-02-17T08:30:00+01:00</OrgnlCreDtTm>
</OrgnlGrpInf>
<OrgnlInstrId>pacs8bizmsgidr01</OrgnlInstrId>
<OrgnlEndToEndId>pacs008EndToEndId-001</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<CxlStsRsnInf>
<AddtlInf>WORLDHELLO,WORLDHELLOWORLDHELLO,WORLDHELLOWORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLD</AddtlInf>
<AddtlInf>NI,HAO</AddtlInf>
<Orgtr>
<Nm>A Debiter</Nm>
<PstlAdr>
<StrtNm>280 Bishopsgate</StrtNm>
<TwnNm>London</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Orgtr>
<Rsn>
<Cd>AGNT</Cd>
</Rsn>
</CxlStsRsnInf>
</TxInfAndSts>
</CxlDtls>
</RsltnOfInvstgtn>
</Document>
</Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<!--
THE MESSAGE WILL WORK “AS IS” IN THE READINESS PORTAL. IT IS ESSENTIAL THAT USERS REMOVE THE ENVELOPE AND REPLACE IT WITH THEIR OWN TRANSPORT HEADER (FOR EXAMPLE FOR ALLIANCE ACCESS YOU WOULD USE THE XML V2 HEADERS).
=========================================================================================================================================================================================
SWIFT © 2020. All rights reserved.
This publication contains SWIFT or third-party confidential information. Do not disclose this publication outside your organisation without SWIFT’s prior written consent.
The use of this document is governed by the legal notices appearing at the end of this document. By using this document, you will be deemed to have accepted those legal notices.
====================================================================================================================================================================
Use Case c.56.1.1 Agent C Danske Bank sends a camt.029 to Agent B Nordea Finland
=============================================================================================================================
Change Log
2020-10-16 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../March21Schemas/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Fr>
<FIId>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt029bizmsgidr-002</BizMsgIdr>
<MsgDefIdr>camt.029.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T16:15:00+01:00</CreDt>
<Rltd>
<Fr>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt029bizmsgidr-002</BizMsgIdr>
<MsgDefIdr>camt.056.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T12:15:00+01:00</CreDt>
</Rltd>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.029.001.09">
<RsltnOfInvstgtn>
<Assgnmt>
<Id>ASSNID-001</Id>
<Assgnr>
<Agt>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgnr>
<Assgne>
<Agt>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgne>
<CreDtTm>2021-02-17T16:15:00+01:00</CreDtTm>
</Assgnmt>
<Sts>
<Conf>CNCL</Conf>
</Sts>
<CxlDtls>
<TxInfAndSts>
<CxlStsId>CNCL-ID001</CxlStsId>
<RslvdCase>
<Id>CSE-001</Id>
<Cretr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Cretr>
</RslvdCase>
<OrgnlGrpInf>
<OrgnlMsgId>pacs8bizmsgidr01</OrgnlMsgId>
<OrgnlMsgNmId>pacs.009.001.08</OrgnlMsgNmId>
<OrgnlCreDtTm>2021-02-17T08:30:00+01:00</OrgnlCreDtTm>
</OrgnlGrpInf>
<OrgnlInstrId>pacs8bizmsgidr01</OrgnlInstrId>
<OrgnlEndToEndId>pacs008EndToEndId-001</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<CxlStsRsnInf>
<AddtlInf>ORLDHELLO,WORLDWORLDHORLDHELLO,WORLDWORLDHORLDHELLO,WORLDWORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLD</AddtlInf>
<AddtlInf>NI,HAO</AddtlInf>
<Orgtr>
<Nm>A Debiter</Nm>
<PstlAdr>
<StrtNm>280 Bishopsgate</StrtNm>
<TwnNm>London</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Orgtr>
<Rsn>
<Cd>AGNT</Cd>
</Rsn>
</CxlStsRsnInf>
</TxInfAndSts>
</CxlDtls>
</RsltnOfInvstgtn>
</Document>
</Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<!--
THE MESSAGE WILL WORK “AS IS” IN THE READINESS PORTAL. IT IS ESSENTIAL THAT USERS REMOVE THE ENVELOPE AND REPLACE IT WITH THEIR OWN TRANSPORT HEADER (FOR EXAMPLE FOR ALLIANCE ACCESS YOU WOULD USE THE XML V2 HEADERS).
=========================================================================================================================================================================================
SWIFT © 2020. All rights reserved.
This publication contains SWIFT or third-party confidential information. Do not disclose this publication outside your organisation without SWIFT’s prior written consent.
The use of this document is governed by the legal notices appearing at the end of this document. By using this document, you will be deemed to have accepted those legal notices.
====================================================================================================================================================================
Use Case c.56.1.1 Agent A RBS plc sends a camt.056 to Agent B Nordea Finland
========================================================================================================================
Change Log
2020-10-16 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../March21Schemas_COV/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt056bizmsgidr-001</BizMsgIdr>
<MsgDefIdr>camt.056.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T12:10:00+01:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.056.001.08">
<FIToFIPmtCxlReq>
<Assgnmt>
<Id>ASSNID-001</Id>
<Assgnr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Assgnr>
<Assgne>
<Agt>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgne>
<CreDtTm>2021-02-17T08:30:00+01:00</CreDtTm>
</Assgnmt>
<Undrlyg>
<TxInf>
<Case>
<Id>CSE-001</Id>
<Cretr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Cretr>
</Case>
<OrgnlGrpInf>
<OrgnlMsgId>pacs8bizmsgidr01</OrgnlMsgId>
<OrgnlMsgNmId>pacs.008.001.08</OrgnlMsgNmId>
<OrgnlCreDtTm>2021-02-17T08:30:00+01:00</OrgnlCreDtTm>
</OrgnlGrpInf>
<OrgnlInstrId>pacs8bizmsgidr01</OrgnlInstrId>
<OrgnlEndToEndId>pacs008EndToEndId-001</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<OrgnlIntrBkSttlmAmt Ccy="EUR">1500000</OrgnlIntrBkSttlmAmt>
<OrgnlIntrBkSttlmDt>2021-02-17</OrgnlIntrBkSttlmDt>
<CxlRsnInf>
<AddtlInf>HELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLD</AddtlInf>
<AddtlInf>NI,HAO</AddtlInf>
<Orgtr>
<Nm>A Debiter</Nm>
<PstlAdr>
<StrtNm>280 Bishopsgate</StrtNm>
<TwnNm>London</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Orgtr>
<Rsn>
<Cd>AM09</Cd>
</Rsn>
</CxlRsnInf>
</TxInf>
</Undrlyg>
</FIToFIPmtCxlReq>
</Document>
</Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<!--
THE MESSAGE WILL WORK “AS IS” IN THE READINESS PORTAL. IT IS ESSENTIAL THAT USERS REMOVE THE ENVELOPE AND REPLACE IT WITH THEIR OWN TRANSPORT HEADER (FOR EXAMPLE FOR ALLIANCE ACCESS YOU WOULD USE THE XML V2 HEADERS).
=========================================================================================================================================================================================
SWIFT © 2020. All rights reserved.
This publication contains SWIFT or third-party confidential information. Do not disclose this publication outside your organisation without SWIFT’s prior written consent.
The use of this document is governed by the legal notices appearing at the end of this document. By using this document, you will be deemed to have accepted those legal notices.
====================================================================================================================================================================
Use Case c.56.1.1 Agent A RBS plc sends a camt.056 to Agent B Nordea Finland
========================================================================================================================
Change Log
2020-10-16 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../March21Schemas_COV/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt056bizmsgidr-001</BizMsgIdr>
<MsgDefIdr>camt.056.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-17T12:10:00+01:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.056.001.08">
<FIToFIPmtCxlReq>
<Assgnmt>
<Id>ASSNID-001</Id>
<Assgnr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Assgnr>
<Assgne>
<Agt>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
</FinInstnId>
</Agt>
</Assgne>
<CreDtTm>2021-02-17T08:30:00+01:00</CreDtTm>
</Assgnmt>
<Undrlyg>
<TxInf>
<Case>
<Id>CSE-001</Id>
<Cretr>
<Agt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
</FinInstnId>
</Agt>
</Cretr>
</Case>
<OrgnlGrpInf>
<OrgnlMsgId>pacs8bizmsgidr01</OrgnlMsgId>
<OrgnlMsgNmId>pacs.009.001.08</OrgnlMsgNmId>
<OrgnlCreDtTm>2021-02-17T08:30:00+01:00</OrgnlCreDtTm>
</OrgnlGrpInf>
<OrgnlInstrId>pacs8bizmsgidr01</OrgnlInstrId>
<OrgnlEndToEndId>pacs008EndToEndId-001</OrgnlEndToEndId>
<OrgnlUETR>8a562c67-ca16-48ba-b074-65581be6f001</OrgnlUETR>
<OrgnlIntrBkSttlmAmt Ccy="EUR">1500000</OrgnlIntrBkSttlmAmt>
<OrgnlIntrBkSttlmDt>2021-02-17</OrgnlIntrBkSttlmDt>
<CxlRsnInf>
<AddtlInf>ORLDHELLO,WORLDWORLDHORLDHELLO,WORLDWORLDHORLDHELLO,WORLDWORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLDHELLO,WORLD</AddtlInf>
<AddtlInf>NI,HAO</AddtlInf>
<Orgtr>
<Nm>A Debiter</Nm>
<PstlAdr>
<StrtNm>280 Bishopsgate</StrtNm>
<TwnNm>London</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Orgtr>
<Rsn>
<Cd>AM09</Cd>
</Rsn>
</CxlRsnInf>
</TxInf>
</Undrlyg>
</FIToFIPmtCxlReq>
</Document>
</Envelope>
package com.brilliance.mx2mt.mt192;
import com.brilliance.swift.mx2mt.Mx2MtCreatorManager;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor192 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\Mxcamt05600108_192.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt192 = new Mx2MtCreatorManager().mx2Mt(xmlStr, null, null);
System.out.println(mt192);
}
}
package com.brilliance.mx2mt.mt196;
import com.brilliance.swift.mx2mt.Mx2MtCreatorManager;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor196 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\Mxcamt02900108_196.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt196 = new Mx2MtCreatorManager().mx2Mt(xmlStr, null, null);
System.out.println(mt196);
}
}
package com.brilliance.mx2mt.mt292;
import com.brilliance.swift.mx2mt.Mx2MtCreatorManager;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor292 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\Mxcamt05600108_292.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt292 = new Mx2MtCreatorManager().mx2Mt(xmlStr, null, null);
System.out.println(mt292);
}
}
package com.brilliance.mx2mt.mt296;
import com.brilliance.swift.mx2mt.Mx2MtCreatorManager;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor296 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\Mxcamt02900108_296.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt296 = new Mx2MtCreatorManager().mx2Mt(xmlStr, null, null);
System.out.println(mt296);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment