Commit 149dba8b by chengzhuoshen

修复代码,增加JUNIT测试,删掉以前的测试类

# Conflicts:
#	swiftCore/src/main/java/com/brilliance/swift/util/MessageUtil.java
#	swiftCore/src/main/java/com/brilliance/swift/util/SwiftTransferUtil.java
#	swiftCore/src/main/resources/swiftXml/MxPacs00800108.xml
#	swiftCore/src/test/java/com/brilliance/mt2mx/camt054001/Test900.java
#	swiftCore/src/test/java/com/brilliance/mt2mx/pacs009001/Test.java
#	swiftCore/src/test/java/com/brilliance/mx2element/Test.java
#	swiftCore/src/test/java/com/brilliance/mx2mt/mt103/TestMx2MtFor103.java
#	swiftCore/src/test/java/com/brilliance/mx2mtmap/mt103/Test.java
#	swiftCore/src/test/java/com/brilliance/mx2mtmap/mt202/Test.java
parent 56176fbd
......@@ -70,5 +70,12 @@
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -34,7 +34,7 @@
<Stmt>
<Id>1234</Id>
<StmtPgntn>
<PgNb>10</PgNb>
<PgNb>1</PgNb>
<LastPgInd>true</LastPgInd>
</StmtPgntn>
<ElctrncSeqNb>200</ElctrncSeqNb>
......@@ -44,11 +44,12 @@
<Id>S15612345678012345</Id>
</Othr>
</Id>
<Ccy>USD</Ccy>
</Acct>
<Bal>
<Tp>
<CdOrPrtry>
<Cd>ITBD</Cd>
<Cd>OPBD</Cd>
</CdOrPrtry>
</Tp>
<Amt Ccy="USD">120274.34</Amt>
......@@ -60,7 +61,7 @@
<Bal>
<Tp>
<CdOrPrtry>
<Cd>ITBD</Cd>
<Cd>CLBD</Cd>
</CdOrPrtry>
</Tp>
<Amt Ccy="USD">123456.29</Amt>
......
......@@ -8,7 +8,7 @@ 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.54.2.1 JP Morgan US provides JP Morgan UK with a debit confirmation
Use Case c.54.1.1 Agent A Unicredit provides a debit notification to the debtor Flexo Merchant Services
========================================================================================================================
Change Log
2020-10-16 - Original version
......@@ -19,48 +19,45 @@ Change Log
<Fr>
<FIId>
<FinInstnId>
<BICFI>CHASUS33</BICFI>
<BICFI>BKAUATWW</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>CHASGB2L</BICFI>
<BICFI>FEXMIE2D</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt054bizmsgidr-001</BizMsgIdr>
<MsgDefIdr>camt.054.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-02-23T10:30:47-04:00</CreDt>
<CreDt>2020-09-08T10:00:47+01:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.08">
<BkToCstmrDbtCdtNtfctn>
<GrpHdr>
<MsgId>cmt054bizmsgidr-001</MsgId>
<CreDtTm>2021-02-23T10:30:47-04:00</CreDtTm>
<CreDtTm>2020-09-08T10:00:47+01:00</CreDtTm>
</GrpHdr>
<Ntfctn>
<Id>cmt054NtfctnId-001</Id>
<Id>cmt054NtfctnId-002</Id>
<Acct>
<Id>
<Othr>
<Id>JPMUK987654</Id>
<Id>SML4564887</Id>
</Othr>
</Id>
<Ccy>USD</Ccy>
<Ccy>EUR</Ccy>
</Acct>
<Ntry>
<NtryRef>cmt054NtryRef001</NtryRef>
<Amt Ccy="USD">26541879</Amt>
<NtryRef>cmt054NtryRef002</NtryRef>
<Amt Ccy="EUR">300000</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Sts>
<Cd>BOOK</Cd>
</Sts>
<ValDt>
<Dt>2022-06-15</Dt>
</ValDt>
<BkTxCd>
<Domn>
<Cd>PMNT</Cd>
......@@ -73,35 +70,18 @@ Change Log
<NtryDtls>
<TxDtls>
<Refs>
<InstrId>pacs9bizmsgidr01</InstrId>
<EndToEndId>pacs9EndToEnd001</EndToEndId>
<InstrId>cmt054bizmsgidr-001</InstrId>
<EndToEndId>pacs008EndToEndId-001</EndToEndId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</Refs>
<Amt Ccy="USD">26541879</Amt>
<Amt Ccy="EUR">300000</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<RltdPties>
<Dbtr>
<Agt>
<FinInstnId>
<BICFI>CHASGB2L</BICFI>
</FinInstnId>
</Agt>
</Dbtr>
<Cdtr>
<Agt>
<FinInstnId>
<BICFI>BAUTUS31</BICFI>
</FinInstnId>
</Agt>
</Cdtr>
</RltdPties>
<RltdAgts>
<DbtrAgt>
<FinInstnId>
<BICFI>BAUTUS32</BICFI>
</FinInstnId>
</DbtrAgt>
</RltdAgts>
<RmtInf>
<Ustrd>Inv: AEG-69874/958</Ustrd>
</RmtInf>
<RltdDts>
<IntrBkSttlmDt>2020-09-08</IntrBkSttlmDt>
</RltdDts>
</TxDtls>
</NtryDtls>
</Ntry>
......
<?xml version="1.0" encoding="UTF-8"?>
<?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).
=========================================================================================================================================================================================
......@@ -11,152 +11,152 @@ Use Case p.4.1.1 Agent B Chase New York sends a pacs.004 to Agent A Chase Londo
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 ../../../../Schemas/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>P4B2A-006</BizMsgIdr>
<MsgDefIdr>pacs.004.001.09</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2020-01-11T13:00:00.960-05:00</CreDt>
<Rltd>
<Fr>
<FIId>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>A2B0506272708</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2020-01-11T12:43:41.960+00:00</CreDt>
</Rltd>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.004.001.09">
<PmtRtr>
<GrpHdr>
<MsgId>P4B2A-006</MsgId>
<CreDtTm>2020-01-11T13:00:00.960-05:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../Schemas/Translator_envelope.xsd">
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>P4B2A-006</BizMsgIdr>
<MsgDefIdr>pacs.004.001.09</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2020-01-11T13:00:00.960-05:00</CreDt>
<Rltd>
<Fr>
<FIId>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>A2B0506272708</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2020-01-11T12:43:41.960+00:00</CreDt>
</Rltd>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.004.001.09">
<PmtRtr>
<GrpHdr>
<MsgId>P4B2A-006</MsgId>
<CreDtTm>2020-01-11T13:00:00.960-05:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
<SttlmMtd>INGA</SttlmMtd>
</SttlmInf>
</GrpHdr>
<TxInf>
<OrgnlGrpInf>
<OrgnlMsgId>A2B0506272708</OrgnlMsgId>
<OrgnlMsgNmId>pacs.008.001.08</OrgnlMsgNmId>
</OrgnlGrpInf>
<OrgnlInstrId>A2B0506272708</OrgnlInstrId>
<OrgnlEndToEndId>E2E04044506271305</OrgnlEndToEndId>
<OrgnlUETR>174c245f-2682-4291-ad67-2a41e530cd27</OrgnlUETR>
<OrgnlIntrBkSttlmAmt Ccy="USD">39980</OrgnlIntrBkSttlmAmt>
<OrgnlIntrBkSttlmDt>2020-01-11</OrgnlIntrBkSttlmDt>
</SttlmInf>
</GrpHdr>
<TxInf>
<OrgnlGrpInf>
<OrgnlMsgId>A2B0506272708</OrgnlMsgId>
<OrgnlMsgNmId>pacs.008.001.08</OrgnlMsgNmId>
</OrgnlGrpInf>
<OrgnlInstrId>A2B0506272708</OrgnlInstrId>
<OrgnlEndToEndId>E2E04044506271305</OrgnlEndToEndId>
<OrgnlUETR>174c245f-2682-4291-ad67-2a41e530cd27</OrgnlUETR>
<OrgnlIntrBkSttlmAmt Ccy="USD">39980</OrgnlIntrBkSttlmAmt>
<OrgnlIntrBkSttlmDt>2020-01-11</OrgnlIntrBkSttlmDt>
<RtrdIntrBkSttlmAmt Ccy="USD">39980</RtrdIntrBkSttlmAmt>
<IntrBkSttlmDt>2020-01-11</IntrBkSttlmDt>
<ChrgBr>SHAR</ChrgBr>
<InstgAgt>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</InstdAgt>
<RtrChain>
<Dbtr>
<Agt>
<FinInstnId>
<BICFI>BAUTUS31XXX</BICFI>
</FinInstnId>
</Agt>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>FTSBUS33XXX</BICFI>
</FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Pty>
<Nm>NOKIA CORPORATION</Nm>
<PstlAdr>
<StrtNm>1510 ARLINGTON BUSINESS PARK</StrtNm>
<TwnNm>THEALE</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Pty>
</Cdtr>
</RtrChain>
<RtrRsnInf>
<Rsn>
<Cd>AC07</Cd>
</Rsn>
</RtrRsnInf>
<OrgnlTxRef>
<Dbtr>
<Pty>
<Nm>NOKIA CORPORATION</Nm>
<PstlAdr>
<StrtNm>1510 ARLINGTON BUSINESS PARK</StrtNm>
<TwnNm>THEALE</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Pty>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>96459873</Id>
</Othr>
</Id>
</DbtrAcct>
<Cdtr>
<Pty>
<Nm>ATnT</Nm>
<PstlAdr>
<StrtNm>208 ARAKD S</StrtNm>
<TwnNm>DALLAS</TwnNm>
<Ctry>US</Ctry>
</PstlAdr>
</Pty>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>80869728</Id>
</Othr>
</Id>
</CdtrAcct>
</OrgnlTxRef>
</TxInf>
</PmtRtr>
</Document>
<IntrBkSttlmDt>2020-01-11</IntrBkSttlmDt>
<ChrgBr>SHAR</ChrgBr>
<InstgAgt>
<FinInstnId>
<BICFI>CHASUS33XXX</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</InstdAgt>
<RtrChain>
<Dbtr>
<Agt>
<FinInstnId>
<BICFI>BAUTUS31XXX</BICFI>
</FinInstnId>
</Agt>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>FTSBUS33XXX</BICFI>
</FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>CHASGB2LXXX</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Pty>
<Nm>NOKIA CORPORATION</Nm>
<PstlAdr>
<StrtNm>1510 ARLINGTON BUSINESS PARK</StrtNm>
<TwnNm>THEALE</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Pty>
</Cdtr>
</RtrChain>
<RtrRsnInf>
<Rsn>
<Cd>AC07</Cd>
</Rsn>
</RtrRsnInf>
<OrgnlTxRef>
<Dbtr>
<Pty>
<Nm>NOKIA CORPORATION</Nm>
<PstlAdr>
<StrtNm>1510 ARLINGTON BUSINESS PARK</StrtNm>
<TwnNm>THEALE</TwnNm>
<Ctry>GB</Ctry>
</PstlAdr>
</Pty>
</Dbtr>
<DbtrAcct>
<Id>
<Othr>
<Id>96459873</Id>
</Othr>
</Id>
</DbtrAcct>
<Cdtr>
<Pty>
<Nm>ATnT</Nm>
<PstlAdr>
<StrtNm>208 ARAKD S</StrtNm>
<TwnNm>DALLAS</TwnNm>
<Ctry>US</Ctry>
</PstlAdr>
</Pty>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>80869728</Id>
</Othr>
</Id>
</CdtrAcct>
</OrgnlTxRef>
</TxInf>
</PmtRtr>
</Document>
</Envelope>
......@@ -6,39 +6,38 @@ 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 p.8.1.2 Agent A RBS plc sends a pacs.008 to Agent B ABN Amro
Use Case p.8.1.2 Agent B ABN Amro sends a pacs.008 to Agent C KBC Bank
========================================================================================================================
Change Log
2020-10-16 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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>RBOSGB2LXXX</BICFI>
<BICFI>ABNANL2AXXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>ABNANL2AXXX</BICFI>
<BICFI>KREDBEBB</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>pacs8bizmsgidr01</BizMsgIdr>
<BizMsgIdr>pacs8bizmsgidr02</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-04-09T09:00:00+01:00</CreDt>
<PssblDplct>true</PssblDplct>
<CreDt>2021-04-09T09:10:00+02:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
<FIToFICstmrCdtTrf>
<GrpHdr>
<MsgId>pacs8bizmsgidr01</MsgId>
<CreDtTm>2021-04-09T09:00:00+01:00</CreDtTm>
<MsgId>pacs8bizmsgidr02</MsgId>
<CreDtTm>2021-04-09T09:10:00+02:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
<SttlmMtd>INDA</SttlmMtd>
......@@ -46,66 +45,21 @@ Change Log
</GrpHdr>
<CdtTrfTxInf>
<PmtId>
<InstrId>pacs8bizmsgidr01qwerssee</InstrId>
<InstrId>pacs8bizmsgidr02</InstrId>
<EndToEndId>pacs008EndToEndId-001</EndToEndId>
<TxId>123456</TxId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</PmtId>
<PmtTpInf>
<ClrChanl>BOOK</ClrChanl>
<SvcLvl>
<Cd>G001</Cd>
</SvcLvl>
<SvcLvl>
<Cd>G002</Cd>
</SvcLvl>
<SvcLvl>
<Prtry>G005</Prtry>
</SvcLvl>
<LclInstrm>
<Code>QWER</Code>
</LclInstrm>
<CtgyPurp>
<Cd>ASDF</Cd>
</CtgyPurp>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="EUR">15000000</IntrBkSttlmAmt>
<IntrBkSttlmDt>2021-04-09</IntrBkSttlmDt>
<SttlmTmReq>
<CLSTm>09:00:00+01:00</CLSTm>
<TillTm>09:00:00+02:00</TillTm>
<FrTm>09:00:00+03:00</FrTm>
<RjctTm>09:00:00+04:00</RjctTm>
</SttlmTmReq>
<InstdAmt Ccy="EUR">15000000</InstdAmt>
<XchgRate>1</XchgRate>
<ChrgBr>SHAR</ChrgBr>
<ChrgsInf>
<Amt Ccy="EUR">123222222222222678.02</Amt>
<Agt>
<FinInstnId>
<BICFI>PSBCCNBJ</BICFI>
</FinInstnId>
</Agt>
</ChrgsInf>
<ChrgBr>DEBT</ChrgBr>
<InstgAgt>
<FinInstnId>
<BICFI>RBOSGB2LXXX</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
<BICFI>ABNANL2AXXX</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>ABNANL2AXXX</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
<BICFI>KREDBEBB</BICFI>
</FinInstnId>
</InstdAgt>
<Dbtr>
......@@ -113,33 +67,17 @@ Change Log
<PstlAdr>
<StrtNm>High Street</StrtNm>
<TwnNm>Epping</TwnNm>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
<Ctry>GB</Ctry>
<AdrLine>123</AdrLine>
<AdrLine>456</AdrLine>
<AdrLine>789</AdrLine>
</PstlAdr>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>RBOSGB2LXXX</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
</FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>KREDBEBB</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
</FinInstnId>
</CdtrAgt>
<Cdtr>
......@@ -147,46 +85,9 @@ Change Log
<PstlAdr>
<StrtNm>Rue Saint Exupery</StrtNm>
<TwnNm> 17/13 4460 GRACE-HOLLOGNE</TwnNm>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
<Ctry>BG</Ctry>
</PstlAdr>
</Cdtr>
<InstrForCdtrAgt>
<Cd>HOLD</Cd>
<InstrInf>123</InstrInf>
</InstrForCdtrAgt>
<InstrForCdtrAgt>
<Cd>PHOB</Cd>
<InstrInf>456</InstrInf>
</InstrForCdtrAgt>
<InstrForNxtAgt>
<Cd>PHOA</Cd>
<InstrInf>123</InstrInf>
</InstrForNxtAgt>
<InstrForNxtAgt>
<Cd>TELA</Cd>
<InstrInf>456</InstrInf>
</InstrForNxtAgt>
<Purp>
<Cd>CDDP</Cd>
<!--<Prtry>:26T:AA1</Prtry>-->
</Purp>
<RgltryRptg>
<Dtls>
<Inf>123</Inf>
<Inf>456</Inf>
</Dtls>
<Dtls>
<Inf>789</Inf>
<Inf>abc</Inf>
</Dtls>
<Dtls>
<Inf>def</Inf>
<Inf>hijk</Inf>
</Dtls>
</RgltryRptg>
<RmtInf>
<Ustrd>SWEEP 454-9663</Ustrd>
</RmtInf>
......
......@@ -8,13 +8,13 @@ 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 p.9.1.2 Toronto Dominion US provides a notification to Creditor Agent (E) NatWest using a pacs.009 advice
Use Case p.9.1.2 Debtor Agent (B) Toronto Dominion US initiates a core pacs.009 to Toronto Dominion
========================================================================================================================
Change Log
2021-06-30 - Original version
=============================
-->
<Envelope xmlns="urn:swift:xsd:envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:swift:xsd:envelope ../../../../March21Schemas_ADV/Translator_envelope.xsd">
<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">
<Fr>
<FIId>
......@@ -26,49 +26,29 @@ Change Log
<To>
<FIId>
<FinInstnId>
<BICFI>NWBKGB2L</BICFI>
<BICFI>TDOMCATT</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>pacs9bizmsgidr01</BizMsgIdr>
<BizMsgIdr>pacs9bizmsgidr02</BizMsgIdr>
<MsgDefIdr>pacs.009.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.adv.02</BizSvc>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-04-27T10:00:47-04:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08">
<FICdtTrf>
<GrpHdr>
<MsgId>pacs9bizmsgidr01</MsgId>
<MsgId>pacs9bizmsgidr02</MsgId>
<CreDtTm>2021-04-27T10:00:47-04:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
<SttlmMtd>COVE</SttlmMtd>
<InstgRmbrsmntAgt>
<FinInstnId>
<BICFI>TDOMCATT</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
</FinInstnId>
</InstgRmbrsmntAgt>
<InstdRmbrsmntAgt>
<FinInstnId>
<BICFI>ROYCCAT2</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
</FinInstnId>
</InstdRmbrsmntAgt>
<SttlmMtd>INDA</SttlmMtd>
</SttlmInf>
</GrpHdr>
<CdtTrfTxInf>
<PmtId>
<InstrId>pacs9bizmsgidr01</InstrId>
<EndToEndId>pacs009EndToEndId-001</EndToEndId>
<InstrId>pacs9bizmsgidr02</InstrId>
<EndToEndId>pacs9bizmsgidr01</EndToEndId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</PmtId>
<IntrBkSttlmAmt Ccy="CAD">2565972</IntrBkSttlmAmt>
......@@ -76,41 +56,31 @@ Change Log
<InstgAgt>
<FinInstnId>
<BICFI>TDOMUS33</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>NWBKGB2L</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
<BICFI>TDOMCATT</BICFI>
</FinInstnId>
</InstdAgt>
<Dbtr>
<FinInstnId>
<BICFI>CWBKCA61</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
<BICFI>TDOMUS33</BICFI>
</FinInstnId>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>TDOMCATT</BICFI>
</FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>ROYCCAT2</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
<PstlAdr>
<TwnLctnNm>zhangsan</TwnLctnNm>
<DstrctNm>lisi</DstrctNm>
<CtrySubDvsn>wangwu</CtrySubDvsn>
</PstlAdr>
<BICFI>NWBKGB2L</BICFI>
</FinInstnId>
</Cdtr>
</CdtTrfTxInf>
......
......@@ -6,7 +6,7 @@ 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 p.9.2.1 Agent B Nordea Finland sends a pacs.009 to Agent C Danske Bank
Use Case p.9.2.3 Agent B Bank of America sends a pacs.009 to Agent C Bank of NY Mellon
========================================================================================================================
Change Log
2020-10-16 - Original version
......@@ -17,27 +17,27 @@ Change Log
<Fr>
<FIId>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
<BICFI>BOFAUS3N</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
<BICFI>IRVTUS3N</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>pacs9bizmsgidr02</BizMsgIdr>
<MsgDefIdr>pacs.009.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.cov.02</BizSvc>
<CreDt>2021-05-17T10:23:41.00+01:00</CreDt>
<CreDt>2021-05-24T10:23:41.00-06:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.08">
<FICdtTrf>
<GrpHdr>
<MsgId>pacs9bizmsgidr02</MsgId>
<CreDtTm>2021-05-17T10:23:41.00+00:00</CreDtTm>
<CreDtTm>2021-05-24T10:23:41.00-06:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
<SttlmMtd>INDA</SttlmMtd>
......@@ -49,31 +49,31 @@ Change Log
<EndToEndId>pacs8bizmsgidr01</EndToEndId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</PmtId>
<IntrBkSttlmAmt Ccy="EUR">1500000</IntrBkSttlmAmt>
<IntrBkSttlmAmt Ccy="HRK">1500000</IntrBkSttlmAmt>
<IntrBkSttlmDt>2021-05-17</IntrBkSttlmDt>
<InstgAgt>
<FinInstnId>
<BICFI>NDEAFIHH</BICFI>
<BICFI>BOFAUS3N</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
<BICFI>IRVTUS3N</BICFI>
</FinInstnId>
</InstdAgt>
<Dbtr>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
<BICFI>BNMXMXMM</BICFI>
</FinInstnId>
</Dbtr>
<CdtrAgt>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
<BICFI>IRVTUS3N</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<FinInstnId>
<BICFI>OKOYFIHH</BICFI>
<BICFI>PDKCHR2X</BICFI>
</FinInstnId>
</Cdtr>
<RmtInf>
......@@ -81,45 +81,36 @@ Change Log
</RmtInf>
<UndrlygCstmrCdtTrf>
<Dbtr>
<Nm>A Debiter</Nm>
<Nm>M Spares</Nm>
<PstlAdr>
<StrtNm>280 Bishopsgate</StrtNm>
<TwnNm>London</TwnNm>
<Ctry>GB</Ctry>
<StrtNm>Tequila Street</StrtNm>
<TwnNm>Mexico City</TwnNm>
<Ctry>MX</Ctry>
</PstlAdr>
</Dbtr>
<DbtrAgt>
<FinInstnId>
<BICFI>RBOSGB2L</BICFI>
<BICFI>BNMXMXMM</BICFI>
</FinInstnId>
</DbtrAgt>
<IntrmyAgt1>
<FinInstnId>
<BICFI>HELSFIHH</BICFI>
<BICFI>IRVTUS3N</BICFI>
</FinInstnId>
</IntrmyAgt1>
<CdtrAgt>
<FinInstnId>
<BICFI>OKOYFIHH</BICFI>
<BICFI>PDKCHR2X</BICFI>
</FinInstnId>
</CdtrAgt>
<Cdtr>
<Nm>Z Krediter</Nm>
<Nm>Rimac</Nm>
<PstlAdr>
<StrtNm>Antinkatu 11</StrtNm>
<TwnNm>Pori</TwnNm>
<Ctry>FI</Ctry>
<StrtNm>Ljublijanska 7</StrtNm>
<TwnNm>Sveta Nedekja</TwnNm>
<Ctry>HR</Ctry>
</PstlAdr>
</Cdtr>
<RmtInf>
<Strd>
<AddtlRmtInf>123</AddtlRmtInf>
<AddtlRmtInf>456</AddtlRmtInf>
</Strd>
<Strd>
<AddtlRmtInf>234</AddtlRmtInf>
</Strd>
</RmtInf>
</UndrlygCstmrCdtTrf>
</CdtTrfTxInf>
</FICdtTrf>
......
<?xml version="1.0" encoding="UTF-8" ?>
<RequestPayload>
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>SHWHQWER123</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>BJWHS12XXXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>00010013800002001234</BizMsgIdr>
<MsgDefIdr>camt.053.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2022-07-15T16:38:49.867+08:00</CreDt>
<PssblDplct>false</PssblDplct>
<Prty>NORM</Prty>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08">
<BkToCstmrStmt>
<GrpHdr>
<MsgId>00010013800002001234</MsgId>
<CreDtTm>2022-07-15T16:38:49.867+08:00</CreDtTm>
</GrpHdr>
<Stmt>
<Id>00010013800002001234</Id>
<StmtPgntn>
<PgNb>200</PgNb>
<LastPgInd>false</LastPgInd>
</StmtPgntn>
<LglSeqNb>178</LglSeqNb>
<Acct>
<Id>
<Othr>
<Id>S15612345678012345</Id>
</Othr>
</Id>
</Acct>
<Bal>
<Tp>
<CdOrPrtry>
<Cd>OPBD</Cd>
</CdOrPrtry>
<SubTp>
<Cd>INTM</Cd>
</SubTp>
</Tp>
<Amt Ccy="USD">377583.3</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Dt>
<Dt>2022-03-26</Dt>
</Dt>
</Bal>
<Bal>
<Tp>
<CdOrPrtry>
<Cd>CLBD</Cd>
</CdOrPrtry>
<SubTp>
<Cd>INTM</Cd>
</SubTp>
</Tp>
<Amt Ccy="USD">3372767.3</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Dt>
<Dt>2022-03-27</Dt>
</Dt>
</Bal>
<Ntry>
<Amt Ccy="USD">4371</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<BookgDt>
<Dt>2022-03-29</Dt>
</BookgDt>
<ValDt>
<Dt>2022-03-30</Dt>
</ValDt>
<AcctSvcrRef>1309170100000390154395</AcctSvcrRef>
<NtryDtls>
<TxDtls>
<Refs>
<EndToEndId>S100000189-735</EndToEndId>
</Refs>
<AddtlTxInf>PLACI LOVECNAMENSKIH WUHAN</AddtlTxInf>
</TxDtls>
</NtryDtls>
</Ntry>
<Ntry>
<Amt Ccy="USD">445</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<BookgDt>
<Dt>2022-04-29</Dt>
</BookgDt>
<ValDt>
<Dt>2022-03-30</Dt>
</ValDt>
<AcctSvcrRef>1309170100000390154395</AcctSvcrRef>
<NtryDtls>
<TxDtls>
<Refs>
<EndToEndId>S100000189-735</EndToEndId>
</Refs>
<AddtlTxInf>PLACI LOVECNAMENSKIH STORITEV</AddtlTxInf>
</TxDtls>
</NtryDtls>
</Ntry>
</Stmt>
</BkToCstmrStmt>
</Document>
</RequestPayload>
\ No newline at end of file
<?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).
=========================================================================================================================================================================================
Legal Disclaimer:
=================
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.53.1.a Creditor Agent AND Bank as the Account Servicer produces and sends a statement to the account owner Julius Baer.
============================================================================================================================
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">
<Fr>
<FIId>
<FinInstnId>
<BICFI>BACALULLXXX</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>BAERLULUXXX</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>cmt053bizmsgidr-001</BizMsgIdr>
<MsgDefIdr>camt.053.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2020-08-04T18:00:00+02:00</CreDt>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.08">
<BkToCstmrStmt>
<GrpHdr>
<MsgId>cmt053bizmsgidr-001</MsgId>
<CreDtTm>2020-08-04T18:00:00+02:00</CreDtTm>
</GrpHdr>
<Stmt>
<Id>100-01</Id>
<StmtPgntn>
<PgNb>1</PgNb>
<LastPgInd>true</LastPgInd>
</StmtPgntn>
<LglSeqNb>1001</LglSeqNb>
<Acct>
<Id>
<Othr>
<Id>48751258</Id>
</Othr>
</Id>
<Ccy>EUR</Ccy>
</Acct>
<Bal>
<Tp>
<CdOrPrtry>
<Cd>OPBD</Cd>
</CdOrPrtry>
</Tp>
<Amt Ccy="EUR">8547.25</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Dt>
<Dt>2020-08-04</Dt>
</Dt>
</Bal>
<Bal>
<Tp>
<CdOrPrtry>
<Cd>CLBD</Cd>
</CdOrPrtry>
</Tp>
<Amt Ccy="EUR">8547.25</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Dt>
<Dt>2020-08-04</Dt>
</Dt>
</Bal>
<Ntry>
<Amt Ccy="EUR">35000</Amt>
<CdtDbtInd>DBIT</CdtDbtInd>
<Sts>
<Cd>BOOK</Cd>
</Sts>
<ValDt>
<Dt>2020-08-04</Dt>
</ValDt>
<AcctSvcrRef>ABKREF-125646</AcctSvcrRef>
<BkTxCd>
<Domn>
<Cd>PMNT</Cd>
<Fmly>
<Cd>RCDT</Cd>
<SubFmlyCd>XBCT</SubFmlyCd>
</Fmly>
</Domn>
</BkTxCd>
<NtryDtls>
<TxDtls>
<Refs>
<AcctSvcrRef>ABKREF-125646</AcctSvcrRef>
<InstrId>cmt053bizmsgidr-001</InstrId>
<EndToEndId>pacs008EndToEndId-001</EndToEndId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</Refs>
<Amt Ccy="EUR">35000</Amt>
<CdtDbtInd>CRDT</CdtDbtInd>
</TxDtls>
</NtryDtls>
</Ntry>
</Stmt>
</BkToCstmrStmt>
</Document>
</Envelope>
\ No newline at end of file
package com.brilliance;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import java.io.File;
import java.util.List;
import java.util.Map;
public class Mt2MxTest {
public void printSwiftTranslationReport(SwiftTranslationReport str) {
if (str != null) {
String errorDsp = "";
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
errorDsp += errorInfo.getErrorType()
+ "-" + errorInfo.getErrorCode()
+ ":" + errorInfo.getDescription();
if (StringUtil.isNotEmpty(errorInfo.getLocation())) {
errorDsp += ";Occur in the " + errorInfo.getLocation();
}
if (StringUtil.isNotEmpty(errorInfo.getOriginalValue())) {
errorDsp += ";Original Value is " + errorInfo.getOriginalValue();
}
errorDsp += Mx2MtConstants.NEW_LINE;
}
}
if (StringUtil.isNotEmpty(errorDsp)) {
System.out.println(errorDsp);
}
System.out.println(str.getMessage());
}
}
public void test(String source, Map<String, Object> extraMap) {
File file = FileUtils.toFile(Mx2MtTest.class.getResource(source));
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(file, null, extraMap);
printSwiftTranslationReport(str);
}
@Test
public void testPacs008001() {
test("/swiftTxt/Mt103.txt", null);
}
}
package com.brilliance;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import java.io.File;
public class Mx2ElementTest {
@Test
public void testPacs008001() {
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
String elementStr = SwiftTransfer.mx2Element(file);
System.out.println(elementStr);
}
}
package com.brilliance;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import java.io.File;
import java.util.List;
import java.util.Map;
public class Mx2MtTest {
public void printSwiftTranslationReport(SwiftTranslationReport str) {
if (str != null) {
String errorDsp = "";
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
errorDsp += errorInfo.getErrorType()
+ "-" + errorInfo.getErrorCode()
+ ":" + errorInfo.getDescription();
if (StringUtil.isNotEmpty(errorInfo.getLocation())) {
errorDsp += ";Occur in the " + errorInfo.getLocation();
}
if (StringUtil.isNotEmpty(errorInfo.getOriginalValue())) {
errorDsp += ";Original Value is " + errorInfo.getOriginalValue();
}
errorDsp += Mx2MtConstants.NEW_LINE;
}
}
if (StringUtil.isNotEmpty(errorDsp)) {
System.out.println(errorDsp);
}
System.out.println(str.getMessage());
}
}
public void test(String source, Map<String, Object> extraMap) {
File file = FileUtils.toFile(Mx2MtTest.class.getResource(source));
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(file, null, extraMap);
printSwiftTranslationReport(str);
}
@Test
public void test103() {
test("/swiftXml/MxPacs00800108.xml", null);
}
@Test
public void test103Retn() {
test("/swiftXml/MxPacs004001_Pacs008.xml", null);
}
@Test
public void test202() {
test("/swiftXml/MxPacs00900108.xml", null);
}
@Test
public void test202Cov() {
test("/swiftXml/MxPacs00900108_COV.xml", null);
}
@Test
public void test900() {
test("/swiftXml/MxCamt05400108_DEBIT.xml", null);
}
@Test
public void test910() {
test("/swiftXml/MxCamt05400108_CREDIT.xml", null);
}
@Test
public void test940() {
test("/swiftXml/MxCamt05300108_940.xml", null);
}
@Test
public void test950() {
test("/swiftXml/MxCamt05300108_950.xml", null);
}
}
package com.brilliance;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import java.io.File;
public class MxXsdValidator {
@Test
public void testPacs008001() {
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
boolean flag = SwiftTransfer.validateMx(file);
System.out.println(flag);
}
}
package com.brilliance.mt2mx.camt029001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test196 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT196.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt02900109_196.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt029001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test296 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT296.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt02900109_296.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt052001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test942 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT942.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05200108_942.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt052001;
import com.brilliance.swift.SwiftTransfer;
import java.io.File;
/**
* @author zh
* @create 2022-07-19 9:20
*/
public class test {
public static void main(String[] args) {
File file = new File("E:/TEST/MX/camt05200108_942.xml");
SwiftTransfer.validateMx(file);
}
}
package com.brilliance.mt2mx.camt053001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test940 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT940.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05300108_940.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt053001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test950 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT950.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05300108_950.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt054001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.mt2mx.Mt2MxCreatorManager;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test900 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT900.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05400108_900.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt054001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.mt2mx.Mt2MxCreatorManager;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test910 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT910.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05400108_910.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt056001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test192 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT192.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05600108_192.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt056001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test292 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT292.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05600108_292.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt057001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test210 {
public static void main(String[] args) throws IOException {
File file = new File("E:/TEST/MT/MT210.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "E:/TEST/MX/camt05700106.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.camt060001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
File file = new File("D:/test/MT920.txt");
String mtStr = FileUtils.readFileToString(file);
String xmlStr = SwiftTransfer.mt2Mx(mtStr, null, null);
System.out.println(xmlStr);
}
}
package com.brilliance.mt2mx.pacs008001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test {
public static void main(String[] args) throws IOException {
//File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftTxt\\Mt103.txt");
File file = new File("d:/test/MT103.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "D:/test/mt2mx/pacs00800108.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mt2mx.pacs009001;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.List;
public class Test {
private static void test202() throws IOException {
//File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftTxt\\Mt103.txt");
File file = new File("d:/test/MT202.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "D:/test/mt2mx/pacs00900108.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
private static void test202Cov() throws IOException {
//File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftTxt\\Mt103.txt");
File file = new File("d:/test/MT202Cov.txt");
String mtStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mt2MxPlus(mtStr, "D:/test/mt2mx/pacs00900108.xml", null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
public static void main(String[] args) throws IOException {
//test202();
test202Cov();
}
}
package com.brilliance.mx2element;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00800108.xml");
//File file = new File("d:/test/MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
}
}
package com.brilliance.mx2element.camt029001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test196 {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt02900108_196.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
// SwiftTransfer.validateMx(file);
}
}
package com.brilliance.mx2element.camt053001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test950 {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05300108_950.xml");
//File file = new File("d:/test/MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
}
}
package com.brilliance.mx2element.camt054001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test910 {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_CREDIT.xml");
//File file = new File("d:/test/MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
}
}
package com.brilliance.mx2element.camt056001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test192 {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05600108_192.xml");
//File file = new File("d:/test/MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
}
}
package com.brilliance.mx2element.pacs009001;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
//File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_CREDIT.xml");
//File file = new File("d:/test/MxPacs00900108.xml");
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00900108.xml");
String xmlStr = FileUtils.readFileToString(file);
String jsonStr = SwiftTransfer.mx2Element(xmlStr);
System.out.println(jsonStr);
}
}
package com.brilliance.mx2mt.mt103;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TestMx2MtFor103 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
Map<String, Object> maps = new HashMap<String, Object>();
maps.put("Block3_103", "app");
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, maps);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt103.retn;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class Test {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs004001_Pacs008.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt192;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor192 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\camt05600108_192.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt196;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor196 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\camt02900109_196.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt202;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor202 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00900108.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt202;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor202COV {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00900108_COV.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt202.retn;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class Test {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs004001_Pacs009.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt210;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor210 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05700106.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt292;
import com.brilliance.swift.SwiftTransfer;
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 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt292);
}
}
package com.brilliance.mx2mt.mt900;
import com.brilliance.swift.constants.Mx2MtConstants;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
/**
* @author zh
* @create 2022-04-20 15:13
*/
public class TestMT900obj {
public static void main(String[] args) throws IOException {
String key = "fitificstmrcdttrf.cdttrftxinf.rgltryrptg*.dtl*.inf*";
key = key.replace("*", "(\\([0-9]{1}\\)){0,1}");
System.out.println(key);
Map<String, String> maps = new LinkedHashMap<>();
maps.put("fitificstmrcdttrf.cdttrftxinf.rgltryrptg.dtl.inf", "第一条数据");
maps.put("fitificstmrcdttrf.cdttrftxinf.rgltryrptg.dtl.inf(1)", "第二条数据");
maps.put("fitificstmrcdttrf.cdttrftxinf.rgltryrptg(0).dtl(0).inf(2)", "第三条数据");
maps.put("fitificstmrcdttrf.cdttrftxinf.rgltryrptg(0).dtl(1).inf(0)", "第四条数据");
maps.put("fitificstmrcdttrf.cdttrftxinf.rgltryrptg(1).dtl(1).inf(0)", "第五条数据");
maps.put("fitificstmrcdttrf.cdttrftxinf.datestr", "20220530");
String str = "";
Set<String> keys = maps.keySet();
for (String tmpkey : keys) {
if (tmpkey.matches(key)) {
str += maps.get(tmpkey) + Mx2MtConstants.NEW_LINE;
}
}
System.out.println(str);
}
}
package com.brilliance.mx2mt.mt900;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor900 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_DEBIT.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt900 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt900);
}
}
package com.brilliance.mx2mt.mt910;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor910 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\camt05400108_910.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt910 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt910);
}
}
package com.brilliance.mx2mt.mt920;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
public class Test {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt06000105.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt920 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt920);
}
}
package com.brilliance.mx2mt.mt940;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.mx2mt.Mx2MtCreatorManager;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.net.URL;
import java.util.List;
public class Mx2Mt940 {
public static void main(String[] args) throws Exception{
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\camt05300108_950.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt941;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
public class TestMx2MtFor941 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MXcamt05200108_941.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt941 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt941);
}
}
package com.brilliance.mx2mt.mt941.mt296;
import com.brilliance.swift.SwiftTransfer;
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 = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt296);
}
}
package com.brilliance.mx2mt.mt942;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor942 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MXcamt05200108_942.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mt950;
import com.prowidesoftware.swift.model.mx.MxCamt05300102;
import com.prowidesoftware.swift.model.mx.dic.*;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
public class MessageCreationMxCamt05300102 {
public static void main(String[] args) throws DatatypeConfigurationException {
MxCamt05300102 mxCamt05300102 = new MxCamt05300102();
BankToCustomerStatementV02 bkToCstmrStmt = new BankToCustomerStatementV02();
//set groupHeader
GroupHeader42 grpHdr = new GroupHeader42();
grpHdr.setMsgId("00010013800002001234");
GregorianCalendar cal = new GregorianCalendar();
cal.setTime(new Date());
XMLGregorianCalendar creDtTm = DatatypeFactory.newInstance().newXMLGregorianCalendar(cal);
grpHdr.setCreDtTm(creDtTm);
grpHdr.setAddtlInf("EODY");
bkToCstmrStmt.setGrpHdr(grpHdr);
//set Stmt
AccountStatement2 stmt = new AccountStatement2();
stmt.setId("1123456789012317092013");
stmt.setElctrncSeqNb(new BigDecimal("178"));
stmt.setLglSeqNb(new BigDecimal("178"));
stmt.setCreDtTm(creDtTm);
DateTimePeriodDetails frToDt = new DateTimePeriodDetails();
frToDt.setFrDtTm(creDtTm);
frToDt.setToDtTm(creDtTm);
stmt.setFrToDt(frToDt);
ReportingSource1Choice rptgSrc = new ReportingSource1Choice();
rptgSrc.setCd("GPRD");
stmt.setRptgSrc(rptgSrc);
//SET ACCOUNT INFO
CashAccount20 acct = new CashAccount20();
AccountIdentification4Choice id = new AccountIdentification4Choice();
id.setIBAN("S15612345678012345");
acct.setId(id);
acct.setCcy("USD");
BranchAndFinancialInstitutionIdentification4 svcr = new BranchAndFinancialInstitutionIdentification4();
FinancialInstitutionIdentification7 finInstnId = new FinancialInstitutionIdentification7();
finInstnId.setBIC("BJWHS12X");
svcr.setFinInstnId(finInstnId);
acct.setSvcr(svcr);
stmt.setAcct(acct);
//SET CashBalance
List<CashBalance3> balList = new ArrayList<>();
CashBalance3 cashBalance301 = new CashBalance3();
BalanceType12 tp01 = new BalanceType12();
BalanceType5Choice cdOrPrtry01 = new BalanceType5Choice();
cdOrPrtry01.setCd(BalanceType12Code.OPBD);
tp01.setCdOrPrtry(cdOrPrtry01);
cashBalance301.setTp(tp01);
ActiveOrHistoricCurrencyAndAmount amt01 = new ActiveOrHistoricCurrencyAndAmount();
amt01.setCcy("USD");
amt01.setValue(new BigDecimal("120274.34"));
cashBalance301.setAmt(amt01);
cashBalance301.setCdtDbtInd(CreditDebitCode.CRDT);
DateAndDateTimeChoice dt01 = new DateAndDateTimeChoice();
dt01.setDt(creDtTm);
cashBalance301.setDt(dt01);
stmt.addBal(cashBalance301);
CashBalance3 cashBalance302 = new CashBalance3();
BalanceType12 tp02 = new BalanceType12();
BalanceType5Choice cdOrPrtry02 = new BalanceType5Choice();
cdOrPrtry02.setCd(BalanceType12Code.CLBD);
tp02.setCdOrPrtry(cdOrPrtry02);
cashBalance302.setTp(tp02);
ActiveOrHistoricCurrencyAndAmount amt02 = new ActiveOrHistoricCurrencyAndAmount();
amt02.setCcy("USD");
amt02.setValue(new BigDecimal("123456.29"));
cashBalance302.setAmt(amt02);
cashBalance302.setCdtDbtInd(CreditDebitCode.CRDT);
DateAndDateTimeChoice dt02 = new DateAndDateTimeChoice();
dt02.setDt(creDtTm);
cashBalance302.setDt(dt02);
stmt.addBal(cashBalance302);
CashBalance3 cashBalance303 = new CashBalance3();
BalanceType12 tp03 = new BalanceType12();
BalanceType5Choice cdOrPrtry03 = new BalanceType5Choice();
cdOrPrtry03.setCd(BalanceType12Code.CLAV);
tp03.setCdOrPrtry(cdOrPrtry03);
cashBalance303.setTp(tp03);
ActiveOrHistoricCurrencyAndAmount amt03 = new ActiveOrHistoricCurrencyAndAmount();
amt03.setCcy("USD");
amt03.setValue(new BigDecimal("119609.29"));
cashBalance303.setAmt(amt03);
cashBalance303.setCdtDbtInd(CreditDebitCode.CRDT);
DateAndDateTimeChoice dt03 = new DateAndDateTimeChoice();
dt03.setDt(creDtTm);
cashBalance303.setDt(dt03);
stmt.addBal(cashBalance303);
//Ntry
ReportEntry2 reportEntry201 = new ReportEntry2();
reportEntry201.setNtryRef("1309170100003901154395");
ActiveOrHistoricCurrencyAndAmount nTryAmt = new ActiveOrHistoricCurrencyAndAmount();
nTryAmt.setCcy("USD");
nTryAmt.setValue(new BigDecimal("393.17"));
reportEntry201.setAmt(nTryAmt);
reportEntry201.setCdtDbtInd(CreditDebitCode.DBIT);
reportEntry201.setSts(EntryStatus2Code.BOOK);
DateAndDateTimeChoice bookgDt = new DateAndDateTimeChoice();
bookgDt.setDt(creDtTm);
reportEntry201.setBookgDt(bookgDt);
DateAndDateTimeChoice valDt = new DateAndDateTimeChoice();
valDt.setDt(creDtTm);
reportEntry201.setValDt(valDt);
reportEntry201.setAcctSvcrRef("1309170100000390154395");
BankTransactionCodeStructure4 bkTxCd = new BankTransactionCodeStructure4();
ProprietaryBankTransactionCodeStructure1 prtry = new ProprietaryBankTransactionCodeStructure1();
prtry.setCd("123456789");
bkTxCd.setPrtry(prtry);
reportEntry201.setBkTxCd(bkTxCd);
//EntryDetails1
EntryDetails1 entryDetail1 = new EntryDetails1();
EntryTransaction2 entryTransaction2 = new EntryTransaction2();
TransactionReferences2 refs = new TransactionReferences2();
refs.setEndToEndId("S100000189-735");
refs.setTxId("1309170100000390154395");
entryTransaction2.setRefs(refs);
AmountAndCurrencyExchange3 amtDtls = new AmountAndCurrencyExchange3();
AmountAndCurrencyExchangeDetails3 instdAmt = new AmountAndCurrencyExchangeDetails3();
ActiveOrHistoricCurrencyAndAmount amt001 = new ActiveOrHistoricCurrencyAndAmount();
amt001.setCcy("USD");
amt001.setValue(new BigDecimal("393.17"));
instdAmt.setAmt(amt001);
amtDtls.setInstdAmt(instdAmt);
AmountAndCurrencyExchangeDetails3 txAmt = new AmountAndCurrencyExchangeDetails3();
txAmt.setAmt(amt001);
amtDtls.setTxAmt(txAmt);
entryTransaction2.setAmtDtls(amtDtls);
entryTransaction2.setAddtlTxInf("PLACI LOVECNAMENSKIH STORITEV");
entryDetail1.addTxDtls(entryTransaction2);
reportEntry201.addNtryDtls(entryDetail1);
stmt.addNtry(reportEntry201);
bkToCstmrStmt.addStmt(stmt);
mxCamt05300102.setBkToCstmrStmt(bkToCstmrStmt);
try {
JAXBContext jaxbContext = JAXBContext.newInstance(MxCamt05300102.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
File file = new File("D:/test/"+MxCamt05300102.class.getSimpleName()+".xml");
if (!file.exists()) {
file.createNewFile();
}
marshaller.marshal(mxCamt05300102, file);
} catch (JAXBException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
package com.brilliance.mx2mt.mt950;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class TestMx2MtFor950 {
public static void main(String[] args) throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05300108_950.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
}
package com.brilliance.mx2mt.mtn99;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.util.StringUtil;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.List;
public class Test {
public static void test199() throws Exception{
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00200110_Pacs008.xml");
String xmlStr = FileUtils.readFileToString(file);
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(xmlStr, null, null);
if (str != null) {
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i=0; i<errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
String location = errorInfo.getLocation();
String errorType = errorInfo.getErrorType();
String description = errorInfo.getDescription();
System.out.println(location + Mx2MtConstants.NEW_LINE + "-" + errorType + ":" + description);
String originalValue = errorInfo.getOriginalValue();
if (StringUtil.isNotEmpty(originalValue)) {
System.out.println(originalValue);
}
}
}
System.out.println(str.getMessage());
}
}
public static void test299() throws Exception {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00200110_Pacs009.xml");
String xmlStr = FileUtils.readFileToString(file);
String mt103Retn = SwiftTransfer.mx2Mt(xmlStr, null, null);
System.out.println(mt103Retn);
}
public static void main(String[] args) throws Exception {
test199();
//test299();
}
}
package com.brilliance.mx2mtmap.mt103;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00800108.xml");
String xmlStr = FileUtils.readFileToString(file);
Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));
}
}
package com.brilliance.mx2mtmap.mt192;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir") + "\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05600108_292.xml"));
Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));
}
}
package com.brilliance.mx2mtmap.mt196;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir") + "\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt02900108_296.xml"));
Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));
}
}
package com.brilliance.mx2mtmap.mt202;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class Test {
private static void test202() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00900109.xml"));
Map<String, Object> extraMap = new HashMap<>();
extraMap.put("bnkBic", "BANKANC0XXX");//发报
//extraMap.put("bnkBic", "FOOBARC0");//收报
Map<String, String> maps = SwiftTransfer.mx2MtMap(xmlStr, extraMap);
maps.forEach((k, v) -> System.out.println(k + "=" + v));
}
private static void test202Cov() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxPacs00900109_COV.xml"));
Map<String, Object> extraMap = new HashMap<>();
//extraMap.put("bnkBic", "DEUTDEFF");//发报
extraMap.put("bnkBic", "DEUTNL2A");//收报
Map<String, String> maps = SwiftTransfer.mx2MtMap(xmlStr, extraMap);
maps.forEach((k, v) -> System.out.println(k + "=" + v));
}
private static void test196() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt02900108_196.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
private static void test940() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05300108_940.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
private static void test910() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05400108_CREDIT.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
private static void test192() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05600108_192.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
private static void test942() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MXcamt05200108_942.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
private static void test210() throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir")+"\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05700106.xml"));
String maps = SwiftTransfer.mx2Gson(xmlStr);
System.out.println(maps);
}
public static void main(String[] args) throws IOException {
//test202();
//test202Cov();
//test196();
//test910();
//test940();
//test192();
//test942();
test210();
}
}
package com.brilliance.mx2mtmap.mt210;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir") + "\\swiftCore\\src\\main\\resources\\swiftXml\\MxCamt05700106.xml"));
Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));
}
}
package com.brilliance.mx2mtmap.mt942;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir") + "\\swiftCore\\src\\main\\resources\\swiftXml\\MXcamt05200108_942.xml"));
Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));
}
}
package com.brilliance.mx2mtmap.mt950;
import com.brilliance.swift.SwiftTransfer;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class Test {
public static void main(String[] args) throws IOException {
String xmlStr = FileUtils.readFileToString(new File(System.getProperty("user.dir") + "\\swiftCore\\src\\main\\resources\\swiftXml\\camt05300108_940.xml"));
/*Map<String, String> maps = SwiftTransfer.mx2Map(xmlStr);
maps.forEach((k, v) -> System.out.println(k + ":" + v));*/
SwiftTransfer.validateMx(xmlStr);
}
}
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