Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftMtMx
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isc-v3.1-tmp
swiftMtMx
Commits
d6972d2b
Commit
d6972d2b
authored
Aug 14, 2024
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改camt107/camt108/camt109转mt的部分规则逻辑
parent
9a5dc91e
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
93 additions
and
125 deletions
+93
-125
Field20Generate.java
...om/brilliance/swift/mx2mt/mt110/impl/Field20Generate.java
+2
-2
Field32aGenerate.java
...m/brilliance/swift/mx2mt/mt110/impl/Field32aGenerate.java
+2
-2
Field52aGenerate.java
...m/brilliance/swift/mx2mt/mt110/impl/Field52aGenerate.java
+4
-4
Field20Generate.java
...om/brilliance/swift/mx2mt/mt111/impl/Field20Generate.java
+2
-2
Field32aGenerate.java
...m/brilliance/swift/mx2mt/mt111/impl/Field32aGenerate.java
+2
-2
Field20Generate.java
...om/brilliance/swift/mx2mt/mt112/impl/Field20Generate.java
+2
-2
Field76Generate.java
...om/brilliance/swift/mx2mt/mt112/impl/Field76Generate.java
+2
-2
camt10800101.xml
swiftCore/src/main/resources/swiftXml/camt10800101.xml
+58
-68
camt10900101.xml
swiftCore/src/main/resources/swiftXml/camt10900101.xml
+2
-2
camt10900101.xsd
swiftCore/src/main/resources/xsd/camt10900101.xsd
+12
-37
Mx2ElementTest.java
swiftCore/src/test/java/com/brilliance/Mx2ElementTest.java
+3
-0
Mx2MtTest.java
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
+2
-2
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt110/impl/Field20Generate.java
View file @
d6972d2b
...
@@ -20,9 +20,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
...
@@ -20,9 +20,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
if
(
StringUtil
.
isEmpty
(
messageId
))
{
/*
if (StringUtil.isEmpty(messageId)) {
messageId = getXmlNodeValue(appHdrParentElementName, document, "AppHdr.BizMsgIdr");
messageId = getXmlNodeValue(appHdrParentElementName, document, "AppHdr.BizMsgIdr");
}
}
*/
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt110/impl/Field32aGenerate.java
View file @
d6972d2b
...
@@ -33,10 +33,10 @@ public class Field32aGenerate extends AbstractMx2MtTagsGenerate {
...
@@ -33,10 +33,10 @@ public class Field32aGenerate extends AbstractMx2MtTagsGenerate {
String
cheValDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ValDt.Dt"
);
String
cheValDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ValDt.Dt"
);
String
amt
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt"
);
String
amt
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt"
);
String
ccy
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt@Ccy"
);
String
ccy
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt@Ccy"
);
if
(
"XAU"
.
equalsIgnoreCase
(
ccy
)
||
"XAG"
.
equalsIgnoreCase
(
ccy
)
/*
if ("XAU".equalsIgnoreCase(ccy) || "XAG".equalsIgnoreCase(ccy)
|| "XPD".equalsIgnoreCase(ccy) || "XPT".equalsIgnoreCase(ccy)) {
|| "XPD".equalsIgnoreCase(ccy) || "XPT".equalsIgnoreCase(ccy)) {
buildSTErrorInfo(63, bodyHdrParentElementName+".Chq.Amt", ccy);
buildSTErrorInfo(63, bodyHdrParentElementName+".Chq.Amt", ccy);
}
}
*/
if
(
StringUtil
.
isNotEmpty
(
amt
)
&&
StringUtil
.
isNotEmpty
(
ccy
))
{
if
(
StringUtil
.
isNotEmpty
(
amt
)
&&
StringUtil
.
isNotEmpty
(
ccy
))
{
cheAmt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
amt
),
ccy
);
cheAmt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
amt
),
ccy
);
cheAmtCcy
=
ccy
;
cheAmtCcy
=
ccy
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt110/impl/Field52aGenerate.java
View file @
d6972d2b
...
@@ -24,14 +24,14 @@ public class Field52aGenerate extends AbstractMx2MtTagsGenerate {
...
@@ -24,14 +24,14 @@ public class Field52aGenerate extends AbstractMx2MtTagsGenerate {
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
int
cheDrwrAgt
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Chq.DrwrAgt"
);
int
cheDrwrAgt
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Chq.DrwrAgt"
);
int
cheDrwrAgtAcct
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Chq.DrwrAgtAcct"
);
int
cheDrwrAgtAcct
=
getXmlNodeCounts
(
bodyHdrParentElementName
,
document
,
"Chq.DrwrAgtAcct"
);
String
account
=
""
;
//
String account = "";
if
(
cheDrwrAgt
>
0
||
cheDrwrAgtAcct
>
0
)
{
if
(
cheDrwrAgt
>
0
||
cheDrwrAgtAcct
>
0
)
{
String
cheDrwrAgtPath
=
bodyHdrParentElementName
+
".Chq.DrwrAgt"
;
String
cheDrwrAgtPath
=
bodyHdrParentElementName
+
".Chq.DrwrAgt"
;
String
cheDrwrAgtAcctPath
=
bodyHdrParentElementName
+
".Chq.DrwrAgtAcct"
;
String
cheDrwrAgtAcctPath
=
bodyHdrParentElementName
+
".Chq.DrwrAgtAcct"
;
if
(
cheDrwrAgt
==
0
)
{
/*
if (cheDrwrAgt == 0 ) {
account = mx_to_mtAccount(bodyHdrParentElementName + ".Chq.DrwrAgtAcct");
account = mx_to_mtAccount(bodyHdrParentElementName + ".Chq.DrwrAgtAcct");
// tags.add(new Tag(name_52B, account));
// tags.add(new Tag(name_52B, account));
}
else
{
} else {
*/
Tag
tag
=
mx_to_mtAgentGeneric
(
name
,
cheDrwrAgtPath
,
cheDrwrAgtAcctPath
,
true
,
false
,
false
,
null
);
Tag
tag
=
mx_to_mtAgentGeneric
(
name
,
cheDrwrAgtPath
,
cheDrwrAgtAcctPath
,
true
,
false
,
false
,
null
);
if
(
tag
!=
null
)
{
if
(
tag
!=
null
)
{
if
(
name_52D
.
equals
(
tag
.
getName
()))
{
if
(
name_52D
.
equals
(
tag
.
getName
()))
{
...
@@ -40,7 +40,7 @@ public class Field52aGenerate extends AbstractMx2MtTagsGenerate {
...
@@ -40,7 +40,7 @@ public class Field52aGenerate extends AbstractMx2MtTagsGenerate {
}
}
tags
.
add
(
tag
);
tags
.
add
(
tag
);
}
}
}
//
}
}
}
}
}
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt111/impl/Field20Generate.java
View file @
d6972d2b
...
@@ -21,9 +21,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
...
@@ -21,9 +21,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
if
(
StringUtil
.
isEmpty
(
messageId
))
{
/*
if (StringUtil.isEmpty(messageId)) {
messageId = getXmlNodeValue(appHdrParentElementName, document, "AppHdr.BizMsgIdr");
messageId = getXmlNodeValue(appHdrParentElementName, document, "AppHdr.BizMsgIdr");
}
}
*/
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
StringUtil
.
isNotEmpty
(
messageId
))
{
if
(
messageId
.
length
()
>
16
)
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt111/impl/Field32aGenerate.java
View file @
d6972d2b
...
@@ -33,10 +33,10 @@ public class Field32aGenerate extends AbstractMx2MtTagsGenerate {
...
@@ -33,10 +33,10 @@ public class Field32aGenerate extends AbstractMx2MtTagsGenerate {
String
cheValDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.FctvDt.Dt"
);
String
cheValDtValue
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.FctvDt.Dt"
);
String
amt
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt"
);
String
amt
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt"
);
String
ccy
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt@Ccy"
);
String
ccy
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.Amt@Ccy"
);
if
(
"XAU"
.
equalsIgnoreCase
(
ccy
)
||
"XAG"
.
equalsIgnoreCase
(
ccy
)
/*
if ("XAU".equalsIgnoreCase(ccy) || "XAG".equalsIgnoreCase(ccy)
|| "XPD".equalsIgnoreCase(ccy) || "XPT".equalsIgnoreCase(ccy)) {
|| "XPD".equalsIgnoreCase(ccy) || "XPT".equalsIgnoreCase(ccy)) {
buildSTErrorInfo(63, bodyHdrParentElementName+".Chq.Amt", ccy);
buildSTErrorInfo(63, bodyHdrParentElementName+".Chq.Amt", ccy);
}
}
*/
if
(
StringUtil
.
isNotEmpty
(
amt
)
&&
StringUtil
.
isNotEmpty
(
ccy
))
{
if
(
StringUtil
.
isNotEmpty
(
amt
)
&&
StringUtil
.
isNotEmpty
(
ccy
))
{
cheAmt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
amt
),
ccy
);
cheAmt
=
NumberUtil
.
formatAmt
(
new
BigDecimal
(
amt
),
ccy
);
cheAmtCcy
=
ccy
;
cheAmtCcy
=
ccy
;
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt112/impl/Field20Generate.java
View file @
d6972d2b
...
@@ -17,9 +17,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
...
@@ -17,9 +17,9 @@ public class Field20Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
String
messageId
=
getXmlNodeValue
(
grpHdrParentElementName
,
document
,
"GrpHdr.MsgId"
);
if
(
StringUtil
.
isEmpty
(
messageId
)
)
{
/*
if ( StringUtil.isEmpty(messageId) ) {
messageId = getXmlNodeValue(appHdrParentElementName,document,"AppHdr.BizMsgIdr");
messageId = getXmlNodeValue(appHdrParentElementName,document,"AppHdr.BizMsgIdr");
}
}
*/
if
(
StringUtil
.
isNotEmpty
(
messageId
)
)
{
if
(
StringUtil
.
isNotEmpty
(
messageId
)
)
{
if
(
messageId
.
length
()
>
16
)
{
if
(
messageId
.
length
()
>
16
)
{
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
buildSTErrorInfo
(
13
,
"Block4/:20:"
,
messageId
);
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2mt/mt112/impl/Field76Generate.java
View file @
d6972d2b
...
@@ -20,8 +20,8 @@ public class Field76Generate extends AbstractMx2MtTagsGenerate {
...
@@ -20,8 +20,8 @@ public class Field76Generate extends AbstractMx2MtTagsGenerate {
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
SwiftMessage
swiftMessage
=
context
.
get
(
SwiftMessage
.
class
);
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
List
<
Tag
>
tags
=
swiftMessage
.
getBlock4
().
getTags
();
Map
<
String
,
String
>
map
=
new
Hashtable
<>();
Map
<
String
,
String
>
map
=
new
Hashtable
<>();
map
.
put
(
"ACC
P
"
,
"Accepted"
);
map
.
put
(
"ACC
R
"
,
"Accepted"
);
map
.
put
(
"R
EJT
"
,
"Rejected"
);
map
.
put
(
"R
JCR
"
,
"Rejected"
);
String
mxStatusCode
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ChqCxlOrStopSts.Sts.Cd"
);
String
mxStatusCode
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ChqCxlOrStopSts.Sts.Cd"
);
String
mxStatusDes
=
""
;
String
mxStatusDes
=
""
;
String
mxAddInfo
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ChqCxlOrStopSts.AddtlInf"
);
String
mxAddInfo
=
getXmlNodeValue
(
bodyHdrParentElementName
,
document
,
"Chq.ChqCxlOrStopSts.AddtlInf"
);
...
...
swiftCore/src/main/resources/swiftXml/camt10800101.xml
View file @
d6972d2b
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<RequestPayload>
<RequestPayload>
<AppHdr
xmlns=
"urn:iso:std:iso:20022:tech:xsd:head.001.001.02"
>
<AppHdr
xmlns=
"urn:iso:std:iso:20022:tech:xsd:head.001.001.02"
>
<Fr>
<Fr>
<FIId>
<FIId>
<FinInstnId>
<FinInstnId>
<BICFI>
HELSFIHHXXX
</BICFI>
<BICFI>
HELSFIHHXXX
</BICFI>
</FinInstnId>
</FinInstnId>
</FIId>
</FIId>
</Fr>
</Fr>
<To>
<To>
<FIId>
<FIId>
<FinInstnId>
<FinInstnId>
<BICFI>
NDEAFIHHXXX
</BICFI>
<BICFI>
NDEAFIHHXXX
</BICFI>
</FinInstnId>
</FinInstnId>
</FIId>
</FIId>
</To>
</To>
<BizMsgIdr>
CNCL-ID001
</BizMsgIdr>
<BizMsgIdr>
CNCL-ID001
</BizMsgIdr>
<MsgDefIdr>
camt.108.001.01
</MsgDefIdr>
<MsgDefIdr>
camt.108.001.01
</MsgDefIdr>
<BizSvc>
swift.cbprplus.02
</BizSvc>
<BizSvc>
swift.cbprplus.02
</BizSvc>
<CreDt>
2022-07-22T10:17:51.619+08:00
</CreDt>
<CreDt>
2022-07-22T10:17:51.619+08:00
</CreDt>
<PssblDplct>
false
</PssblDplct>
<PssblDplct>
false
</PssblDplct>
<Prty>
NORM
</Prty>
<Prty>
NORM
</Prty>
</AppHdr>
</AppHdr>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.108.001.01"
>
<Document
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.108.001.01"
>
<ChqCxlOrStopReq>
<ChqCxlOrStopReq>
<GrpHdr>
<GrpHdr>
<MsgId>
CSE-001
</MsgId>
<MsgId>
CSE-001
</MsgId>
<CreDtTm>
2022-07-22
</CreDtTm>
<CreDtTm>
2021-04-09T09:00:00+02:00
</CreDtTm>
<NbOfChqs>
1
</NbOfChqs>
<NbOfChqs>
1
</NbOfChqs>
</GrpHdr>
</GrpHdr>
<Chq>
<Chq>
<OrgnlInstrId>
AAAAAAA
</OrgnlInstrId>
<OrgnlInstrId>
AAAAAAA
</OrgnlInstrId>
<!--21-->
<!--21-->
<ChqNb>
BBBBB
</ChqNb>
<!--30-->
<ChqNb>
BBBBB
</ChqNb>
<IsseDt>
2022-09-22
</IsseDt>
<!--32B-->
<!--30-->
<Amt
Ccy=
"USD"
>
123131
</Amt>
<!--32A-->
<IsseDt>
2022-09-22
</IsseDt>
<FctvDt>
<!--32B-->
<Dt>
2022-10-22
</Dt>
<Amt
Ccy=
"USD"
>
123131
</Amt>
</FctvDt>
<!--52D--><!-- <DrwrAgt>--><!-- <FinInstnId>QWERTYOII</FinInstnId>--><!-- </DrwrAgt>--><!--52B-->
<!--32A-->
<DrwrAgtAcct>
<FctvDt>
<Id>
<Dt>
2022-10-22
</Dt>
<IBAN>
AB1234567890
</IBAN>
</FctvDt>
</Id>
<!--52D-->
</DrwrAgtAcct>
<!--59-->
<!-- <DrwrAgt>-->
<Pyee>
<!-- <FinInstnId>QWERTYOII</FinInstnId>-->
<Nm>
TTTT
</Nm>
<!-- </DrwrAgt>-->
<PstlAdr>
<!--52B-->
<AdrLine>
PPPPPPPP
</AdrLine>
<DrwrAgtAcct>
</PstlAdr>
<Id>
</Pyee>
<IBAN>
OBHHIO
</IBAN>
<ChqCxlOrStopRsn>
<!--75-->
</Id>
<Rsn>
</DrwrAgtAcct>
<Cd>
NARR
</Cd>
<!--59-->
</Rsn>
<Pyee>
<AddtlInf>
REWQ123454579789870olikuytrewsadfghjREWQ123454579789870olikuytrewsadfghjREWQ123454579789870olikuytrewsadfghj
</AddtlInf>
<Nm>
TTTT
</Nm>
</ChqCxlOrStopRsn>
<PstlAdr>
</Chq>
<AdrLine>
PPPPPPPP
</AdrLine>
</ChqCxlOrStopReq>
</PstlAdr>
</Document>
</Pyee>
<ChqCxlOrStopRsn>
<!--75-->
<Rsn>
<Cd>
NARR
</Cd>
</Rsn>
<AddtlInf>
REWQ
</AddtlInf>
</ChqCxlOrStopRsn>
</Chq>
</ChqCxlOrStopReq>
</Document>
</RequestPayload>
</RequestPayload>
\ No newline at end of file
swiftCore/src/main/resources/swiftXml/camt10900101.xml
View file @
d6972d2b
...
@@ -57,9 +57,9 @@
...
@@ -57,9 +57,9 @@
</DrwrAgtAcct>
</DrwrAgtAcct>
<ChqCxlOrStopSts>
<ChqCxlOrStopSts>
<Sts>
<Sts>
<Cd>
ACC
P
</Cd>
<Cd>
ACC
R
</Cd>
</Sts>
</Sts>
<AddtlInf>
ABC
</AddtlInf>
<AddtlInf>
REWQ123454579789870olikuytrewsadfghjREWQ123454579789870olikuytrewsadfghjREWQ123454579789870olikuytrewsadfghj
</AddtlInf>
</ChqCxlOrStopSts>
</ChqCxlOrStopSts>
</Chq>
</Chq>
</ChqCxlOrStopRpt>
</ChqCxlOrStopRpt>
...
...
swiftCore/src/main/resources/xsd/camt10900101.xsd
View file @
d6972d2b
...
@@ -29,11 +29,11 @@ Other product, service, or company names in this publication are trade names, tr
...
@@ -29,11 +29,11 @@ Other product, service, or company names in this publication are trade names, tr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Group: Cross Border Payments and Reporting Plus (CBPR+)
Group: Cross Border Payments and Reporting Plus (CBPR+)
Collection: CBPRPlus_
ISO 20022_Portfolio_Release 2023
Collection: CBPRPlus_
SR2024
Usage Guideline: CBPRPlus-camt.109.001.01_ChequeCancellationOrStopReport
Usage Guideline: CBPRPlus-camt.109.001.01_ChequeCancellationOrStopReport
Base Message: camt.109.001.01
Base Message: camt.109.001.01
Date of publication: 1
6 December 2022
Date of publication: 1
9 March 2024
URL: https://www2.swift.com/mystandards/#/mp/mx/_
UQsRECZ9EeyFELcOlo2Q4w/_J873YCZ_EeyFELcOlo2Q4w
URL: https://www2.swift.com/mystandards/#/mp/mx/_
Hzd-0L2ZEe2VOtHXeCwa3Q/_TdEwQW5TEe6ijo6mcWmUwQ
Description: Principles:
Description: Principles:
1A) AGENTS IDENTIFICATION - Textual Rules
1A) AGENTS IDENTIFICATION - Textual Rules
...
@@ -59,7 +59,7 @@ All Name and Address for all actors, Related Remittance Information and Remittan
...
@@ -59,7 +59,7 @@ All Name and Address for all actors, Related Remittance Information and Remittan
< is replaced with <
< is replaced with <
> is replaced with >
> is replaced with >
Generated by the MyStandards web platform [https://www.swift.com/mystandards] on 202
3-06-20T04:02:36
+00:00
Generated by the MyStandards web platform [https://www.swift.com/mystandards] on 202
4-03-21T05:19:47
+00:00
-->
-->
<xs:schema
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.109.001.01"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
targetNamespace=
"urn:iso:std:iso:20022:tech:xsd:camt.109.001.01"
>
<xs:schema
xmlns=
"urn:iso:std:iso:20022:tech:xsd:camt.109.001.01"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
elementFormDefault=
"qualified"
targetNamespace=
"urn:iso:std:iso:20022:tech:xsd:camt.109.001.01"
>
<xs:element
name=
"Document"
type=
"Document"
/>
<xs:element
name=
"Document"
type=
"Document"
/>
...
@@ -116,8 +116,8 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -116,8 +116,8 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
</xs:complexType>
</xs:complexType>
<xs:simpleType
name=
"CBPR_ChequeCancellationOrStopStatusCode"
>
<xs:simpleType
name=
"CBPR_ChequeCancellationOrStopStatusCode"
>
<xs:restriction
base=
"xs:string"
>
<xs:restriction
base=
"xs:string"
>
<xs:enumeration
value=
"R
EJT
"
/>
<xs:enumeration
value=
"R
JCR
"
/>
<xs:enumeration
value=
"ACC
P
"
/>
<xs:enumeration
value=
"ACC
R
"
/>
</xs:restriction>
</xs:restriction>
</xs:simpleType>
</xs:simpleType>
<xs:simpleType
name=
"CBPR_DateTime"
>
<xs:simpleType
name=
"CBPR_DateTime"
>
...
@@ -127,7 +127,7 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -127,7 +127,7 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
</xs:simpleType>
</xs:simpleType>
<xs:simpleType
name=
"CBPR_RestrictedFINXMax140Text"
>
<xs:simpleType
name=
"CBPR_RestrictedFINXMax140Text"
>
<xs:restriction
base=
"xs:string"
>
<xs:restriction
base=
"xs:string"
>
<xs:pattern
value=
"
[0-9a-zA-Z/\-\?:\(\)\.,'\+ ]+
"
/>
<xs:pattern
value=
"
([0-9a-zA-Z\-\?:\(\)\.,'\+ ]([0-9a-zA-Z\-\?:\(\)\.,'\+ ]*(/[0-9a-zA-Z\-\?:\(\)\.,'\+ ])?)*)
"
/>
<xs:minLength
value=
"1"
/>
<xs:minLength
value=
"1"
/>
<xs:maxLength
value=
"140"
/>
<xs:maxLength
value=
"140"
/>
</xs:restriction>
</xs:restriction>
...
@@ -279,11 +279,11 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -279,11 +279,11 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
<xs:element
name=
"Dt"
type=
"ISODate"
/>
<xs:element
name=
"Dt"
type=
"ISODate"
/>
</xs:choice>
</xs:choice>
</xs:complexType>
</xs:complexType>
<xs:complexType
name=
"DateAndPlaceOfBirth1"
>
<xs:complexType
name=
"DateAndPlaceOfBirth1
__1
"
>
<xs:sequence>
<xs:sequence>
<xs:element
name=
"BirthDt"
type=
"ISODate"
/>
<xs:element
name=
"BirthDt"
type=
"ISODate"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"PrvcOfBirth"
type=
"
Max35Text
"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"PrvcOfBirth"
type=
"
CBPR_RestrictedFINXMax35Text_Extended
"
/>
<xs:element
name=
"CityOfBirth"
type=
"
Max35Text
"
/>
<xs:element
name=
"CityOfBirth"
type=
"
CBPR_RestrictedFINXMax35Text_Extended
"
/>
<xs:element
name=
"CtryOfBirth"
type=
"CountryCode"
/>
<xs:element
name=
"CtryOfBirth"
type=
"CountryCode"
/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:complexType>
...
@@ -390,12 +390,6 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -390,12 +390,6 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
<xs:pattern
value=
"[0-9]{1,15}"
/>
<xs:pattern
value=
"[0-9]{1,15}"
/>
</xs:restriction>
</xs:restriction>
</xs:simpleType>
</xs:simpleType>
<xs:simpleType
name=
"Max35Text"
>
<xs:restriction
base=
"xs:string"
>
<xs:minLength
value=
"1"
/>
<xs:maxLength
value=
"35"
/>
</xs:restriction>
</xs:simpleType>
<xs:complexType
name=
"OrganisationIdentification29__1"
>
<xs:complexType
name=
"OrganisationIdentification29__1"
>
<xs:sequence>
<xs:sequence>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"AnyBIC"
type=
"AnyBICDec2014Identifier"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"AnyBIC"
type=
"AnyBICDec2014Identifier"
/>
...
@@ -418,14 +412,14 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -418,14 +412,14 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
<xs:complexType
name=
"PartyIdentification135__1"
>
<xs:complexType
name=
"PartyIdentification135__1"
>
<xs:sequence>
<xs:sequence>
<xs:element
name=
"Nm"
type=
"CBPR_RestrictedFINXMax140Text_Extended"
/>
<xs:element
name=
"Nm"
type=
"CBPR_RestrictedFINXMax140Text_Extended"
/>
<xs:element
name=
"PstlAdr"
type=
"PostalAddress24__
2
"
/>
<xs:element
name=
"PstlAdr"
type=
"PostalAddress24__
1
"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Id"
type=
"Party38Choice__1"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Id"
type=
"Party38Choice__1"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"CtryOfRes"
type=
"CountryCode"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"CtryOfRes"
type=
"CountryCode"
/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:complexType>
<xs:complexType
name=
"PersonIdentification13__1"
>
<xs:complexType
name=
"PersonIdentification13__1"
>
<xs:sequence>
<xs:sequence>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"DtAndPlcOfBirth"
type=
"DateAndPlaceOfBirth1"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"DtAndPlcOfBirth"
type=
"DateAndPlaceOfBirth1
__1
"
/>
<xs:element
maxOccurs=
"2"
minOccurs=
"0"
name=
"Othr"
type=
"GenericPersonIdentification1__1"
/>
<xs:element
maxOccurs=
"2"
minOccurs=
"0"
name=
"Othr"
type=
"GenericPersonIdentification1__1"
/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:complexType>
...
@@ -454,25 +448,6 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
...
@@ -454,25 +448,6 @@ Generated by the MyStandards web platform [https://www.swift.com/mystandards] on
<xs:element
maxOccurs=
"3"
minOccurs=
"0"
name=
"AdrLine"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"3"
minOccurs=
"0"
name=
"AdrLine"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
</xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:complexType>
<xs:complexType
name=
"PostalAddress24__2"
>
<xs:sequence>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Dept"
type=
"CBPR_RestrictedFINXMax70Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"SubDept"
type=
"CBPR_RestrictedFINXMax70Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"StrtNm"
type=
"CBPR_RestrictedFINXMax70Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"BldgNb"
type=
"CBPR_RestrictedFINXMax16Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"BldgNm"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Flr"
type=
"CBPR_RestrictedFINXMax70Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"PstBx"
type=
"CBPR_RestrictedFINXMax16Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Room"
type=
"CBPR_RestrictedFINXMax70Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"PstCd"
type=
"CBPR_RestrictedFINXMax16Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"TwnNm"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"TwnLctnNm"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"DstrctNm"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"CtrySubDvsn"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Ctry"
type=
"CountryCode"
/>
<xs:element
maxOccurs=
"7"
minOccurs=
"0"
name=
"AdrLine"
type=
"CBPR_RestrictedFINXMax35Text_Extended"
/>
</xs:sequence>
</xs:complexType>
<xs:complexType
name=
"ProxyAccountIdentification1__1"
>
<xs:complexType
name=
"ProxyAccountIdentification1__1"
>
<xs:sequence>
<xs:sequence>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Tp"
type=
"ProxyAccountType1Choice__1"
/>
<xs:element
maxOccurs=
"1"
minOccurs=
"0"
name=
"Tp"
type=
"ProxyAccountType1Choice__1"
/>
...
...
swiftCore/src/test/java/com/brilliance/Mx2ElementTest.java
View file @
d6972d2b
...
@@ -7,6 +7,7 @@ import org.junit.Test;
...
@@ -7,6 +7,7 @@ import org.junit.Test;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.util.Map
;
public
class
Mx2ElementTest
{
public
class
Mx2ElementTest
{
...
@@ -44,7 +45,9 @@ public class Mx2ElementTest {
...
@@ -44,7 +45,9 @@ public class Mx2ElementTest {
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt11000101.xml"
).
toURI
().
getPath
());
File
file
=
new
File
(
Mx2MessageTest
.
class
.
getResource
(
"/swiftXml/camt11000101.xml"
).
toURI
().
getPath
());
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
xml
=
new
String
(
Files
.
readAllBytes
(
file
.
toPath
()));
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
String
elementStr
=
SwiftTransfer
.
mx2Element
(
xml
);
Map
<
String
,
Object
>
stringObjectMap
=
SwiftTransfer
.
mx2ElementMaps
(
xml
);
System
.
out
.
println
(
elementStr
);
System
.
out
.
println
(
elementStr
);
System
.
out
.
println
(
"stringObjectMap="
+
stringObjectMap
);
}
}
@Test
@Test
...
...
swiftCore/src/test/java/com/brilliance/Mx2MtTest.java
View file @
d6972d2b
...
@@ -301,8 +301,8 @@ public class Mx2MtTest {
...
@@ -301,8 +301,8 @@ public class Mx2MtTest {
@Test
@Test
public
void
testMx2MtMap
()
throws
IOException
{
public
void
testMx2MtMap
()
throws
IOException
{
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
//File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00900108_COV.xml"));
File
file
=
FileUtils
.
toFile
(
Mx2MtTest
.
class
.
getResource
(
"/swiftXml/iso_ack.xml"
));
//
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/iso_ack.xml"));
//
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/camt10900101.xml"));
File
file
=
FileUtils
.
toFile
(
Mx2MtTest
.
class
.
getResource
(
"/swiftXml/camt10900101.xml"
));
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2MtMap
(
xmlStr
,
null
);
Map
<
String
,
String
>
maps
=
SwiftTransfer
.
mx2MtMap
(
xmlStr
,
null
);
for
(
String
key
:
maps
.
keySet
())
{
for
(
String
key
:
maps
.
keySet
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment