Commit 3fd23a0f by gechengyang

提交解析ISO报文的测试代码

parent d7139ffc
<?xml version="1.0" encoding="UTF-8" ?><Saa:DataPDU xmlns:Saa="urn:swift:saa:xsd:saa.2.0" xmlns:Sw="urn:swift:snl:ns.Sw" xmlns:SwInt="urn:swift:snl:ns.SwInt" xmlns:SwGbl="urn:swift:snl:ns.SwGbl" xmlns:SwSec="urn:swift:snl:ns.SwSec"><Saa:Revision>2.0.10</Saa:Revision><Saa:Header><Saa:Message><Saa:SenderReference>OBNPAUS3NXXX008GPS-20230427T04:00:39.5130$230427710463</Saa:SenderReference><Saa:MessageIdentifier>pacs.008.001.08</Saa:MessageIdentifier><Saa:Format>MX</Saa:Format><Saa:SubFormat>Output</Saa:SubFormat><Saa:Sender><Saa:DN>ou=xxx,o=bnpaus3n,o=swift</Saa:DN><Saa:FullName><Saa:X1>BNPAUS3NXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Sender><Saa:Receiver><Saa:DN>ou=xxx,o=nycbcnsh,o=swift</Saa:DN><Saa:FullName><Saa:X1>NYCBCNSHXXX</Saa:X1><Saa:X2>xxx</Saa:X2></Saa:FullName></Saa:Receiver><Saa:InterfaceInfo><Saa:UserReference>GPS-20230427T04:00:39.5130</Saa:UserReference><Saa:MessageCreator>SWIFTNetInterface</Saa:MessageCreator><Saa:MessageContext>Copy</Saa:MessageContext><Saa:MessageNature>Financial</Saa:MessageNature><Saa:Sumid>1BB5D334FFF528C0</Saa:Sumid><Saa:ServiceURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw</Saa:ServiceURI><Saa:MessageTypeURI>mp/mx/_ImGiIFKDEeyXX57HMRFmxw/_XC3TFV9CEeyfdsiuljUhuQ</Saa:MessageTypeURI></Saa:InterfaceInfo><Saa:NetworkInfo><Saa:Priority>Normal</Saa:Priority><Saa:IsPossibleDuplicate>false</Saa:IsPossibleDuplicate><Saa:Service>swift.finplus</Saa:Service><Saa:Network>SWIFTNet</Saa:Network><Saa:SessionNr>000009</Saa:SessionNr><Saa:SeqNr>000001821</Saa:SeqNr><Saa:SWIFTNetNetworkInfo><Saa:RequestType>pacs.008.001.08</Saa:RequestType><Saa:RequestSubtype>swift.cbprplus.02</Saa:RequestSubtype><Saa:SWIFTRef>swi00001-2023-04-27T08:01:15.59787.1050397Z</Saa:SWIFTRef><Saa:SNLRef>SNL00656-2023-04-27T08:01:15.9543.052169Z</Saa:SNLRef><Saa:Reference>a6d65a50-e4d1-41ed-82d1-8cb25e9851ac</Saa:Reference><Saa:SnFQueueName>nycbcnsh_finplus</Saa:SnFQueueName><Saa:SnFInputTime>0102:2023-04-27T08:01:15</Saa:SnFInputTime><Saa:SnFDeliveryTime>2023-04-27T08:01:15Z</Saa:SnFDeliveryTime><Saa:ValidationDescriptor>
<SwInt:ValResult>Success</SwInt:ValResult>
</Saa:ValidationDescriptor></Saa:SWIFTNetNetworkInfo></Saa:NetworkInfo><Saa:SecurityInfo><Saa:RMAResult>Success</Saa:RMAResult><Saa:SWIFTNetSecurityInfo><Saa:SignatureResult>Success</Saa:SignatureResult><Saa:SignatureValue><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>d1J7zeEWewluVEMh/d+TE3U3IcK8uj438h/osxbSIQA=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
EntrustFile-Version: 2.0
Originator-DN: cn=newyork-fin-ldr1,o=bnpaus3n,o=swift
Orig-SN: 1670742478
MIC-Info: SHA256, RSA,
Cb6XWc106hBvWuneW5HcdPc1s2v/FU0Z1iELoImD8//sCZLr6wXG4UBhNW6hIYeV
3dB/lRCLLS52T4cnymWcwPziqaUjmUpB3FjQHLBt2YEuaKtgtwcEs/uyH5SXLIV9
nuoB5+7/xaAWLmpIrQFe1IVFWu1W5AjxycJpMIqNduFN17N8rJYJhtzrQ29DhocX
ooThZW/poE96V+EJIxfqJpM46djftTWIh8iSvZ+uOo5q8qfMvKt87C0Oak/xKupe
vuaBlGYmmDBHY3LW3P/0sZ7LkKnTpVAHXMNp5ZTeD2EjRI/+6OeX1U25ta7Xmzze
ivemEgBMe+yAKD+gs0CdzQ==
</SwSec:SignatureValue><SwSec:KeyInfo><SwSec:SignDN>cn=newyork-fin-ldr1,o=bnpaus3n,o=swift</SwSec:SignDN><SwSec:CertPolicyId>1.3.21.6.2</SwSec:CertPolicyId></SwSec:KeyInfo><SwSec:Manifest><Sw:Reference><Sw:DigestRef>Sw.RequestHeader</Sw:DigestRef><Sw:DigestValue>9swBrfg+4EvlzHzyoimz1aIaWVxsvpb7x1v2K/dFVVI=</Sw:DigestValue></Sw:Reference><Sw:Reference><Sw:DigestRef>Sw.RequestPayload</Sw:DigestRef><Sw:DigestValue>tCpzV1BejMOB4h1Na7qEtO9TSSbMtAGqIqLy0ztjXRU=</Sw:DigestValue></Sw:Reference><Sw:Reference><Sw:DigestRef>Sw.E2S</Sw:DigestRef><Sw:DigestValue>kn7p0bHYkfTZYcCxiyuTbinRmlYzCKEE8t8kdSakFgA=</Sw:DigestValue></Sw:Reference></SwSec:Manifest></SwSec:Signature><SwSec:Signature><SwSec:SignedInfo><Sw:Reference><Sw:DigestValue>QISwNNDkp+o3Er51ZYmBVzigw9B0nKJG2sc/ZNXUrSg=</Sw:DigestValue></Sw:Reference></SwSec:SignedInfo><SwSec:SignatureValue>PEMF@Proc-Type: 4,MIC-ONLY
Content-Domain: RFC822
EntrustFile-Version: 2.0
Originator-DN: cn=%1,cn=sfm,o=swift,o=swift
Orig-SN: 1670791696
MIC-Info: SHA256, RSA,
H6LNJ0D3IQHWPXmQ1jw3K4EiiZi1ifMpa3jF9Mo4SXkPPuoqJb9qKWP1nzhmnrAi
fRC9dIic1stF8fGDnSRNoxGBvYaBVA23xEP68g3NPxpqJKR56mMjloYNKjvXfttz
2BEhZDmZFDTxfWPr2ZhUZ1bt1o4Mm7xfdqrYt5+0r5d/CIXMtcVAw2muOi6QyD+e
lHB8fCSHQ9FdqaaXQE8F3UDrTzmC/vLPRCdQmEgt5Z6XmWI8fxemtu8hOEiiwZ0+
ZbpGOy82P7XvHYLZ/NmLagPX5OD298cH1EnqyviofasdRG5s4W7L+h8kzaoRDvB3
jyr3ZjqQNzE+uZ+o+cjxOg==
</SwSec:SignatureValue><SwSec:KeyInfo><SwSec:SignDN>cn=%1,cn=sfm,o=swift,o=swift</SwSec:SignDN><SwSec:CertPolicyId>1.3.21.6.3.10.100.3</SwSec:CertPolicyId></SwSec:KeyInfo><SwSec:Manifest><Sw:Reference><Sw:DigestRef>Sw.RequestHeader</Sw:DigestRef><Sw:DigestValue>9swBrfg+4EvlzHzyoimz1aIaWVxsvpb7x1v2K/dFVVI=</Sw:DigestValue></Sw:Reference><Sw:Reference><Sw:DigestRef>Sw.RequestPayload</Sw:DigestRef><Sw:DigestValue>tCpzV1BejMOB4h1Na7qEtO9TSSbMtAGqIqLy0ztjXRU=</Sw:DigestValue></Sw:Reference><Sw:Reference><Sw:DigestRef>Translated MT</Sw:DigestRef><Sw:DigestValue>3a3Cc6XAZasQxCH6vUfgJ/oEoJAFZcp+m3FWnK6oWug=</Sw:DigestValue></Sw:Reference></SwSec:Manifest></SwSec:Signature></Saa:SignatureValue></Saa:SWIFTNetSecurityInfo></Saa:SecurityInfo><Saa:ExpiryDateTime>20230517080116</Saa:ExpiryDateTime></Saa:Message></Saa:Header><Saa:Body>
<AppHdr xmlns="urn:iso:std:iso:20022:tech:xsd:head.001.001.02">
<Fr>
<FIId>
<FinInstnId>
<BICFI>BNPAUS3N</BICFI>
</FinInstnId>
</FIId>
</Fr>
<To>
<FIId>
<FinInstnId>
<BICFI>NYCBCNSH</BICFI>
</FinInstnId>
</FIId>
</To>
<BizMsgIdr>GPS-20230427BNPAUS3NP017301</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2023-04-27T04:00:37-05:00</CreDt>
<Prty>NORM</Prty>
</AppHdr>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
<FIToFICstmrCdtTrf>
<GrpHdr>
<MsgId>GPS-20230427BNPAUS3NP017301</MsgId>
<CreDtTm>2023-04-27T04:00:37-05:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
<SttlmMtd>COVE</SttlmMtd>
<InstdRmbrsmntAgt>
<FinInstnId>
<BICFI>CHASUS33</BICFI>
</FinInstnId>
</InstdRmbrsmntAgt>
</SttlmInf>
</GrpHdr>
<CdtTrfTxInf>
<PmtId>
<InstrId>PAY230427C013150</InstrId>
<EndToEndId>3251025000180623</EndToEndId>
<TxId>2023042700006390</TxId>
<UETR>dbc916b7-6c47-4935-8253-f4ffb4ff319b</UETR>
</PmtId>
<PmtTpInf>
<InstrPrty>NORM</InstrPrty>
<SvcLvl>
<Cd>SDVA</Cd>
</SvcLvl>
<SvcLvl>
<Cd>G001</Cd>
</SvcLvl>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="USD">115401.00</IntrBkSttlmAmt>
<IntrBkSttlmDt>2023-04-27</IntrBkSttlmDt>
<SttlmPrty>URGT</SttlmPrty>
<InstdAmt Ccy="USD">115401.00</InstdAmt>
<ChrgBr>DEBT</ChrgBr>
<ChrgsInf>
<Amt Ccy="USD">0.00</Amt>
<Agt>
<FinInstnId>
<BICFI>GEBABEBB36A</BICFI>
</FinInstnId>
</Agt>
</ChrgsInf>
<PrvsInstgAgt1>
<FinInstnId>
<BICFI>GEBABEBB36A</BICFI>
</FinInstnId>
</PrvsInstgAgt1>
<InstgAgt>
<FinInstnId>
<BICFI>BNPAUS3N</BICFI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
<FinInstnId>
<BICFI>NYCBCNSH</BICFI>
</FinInstnId>
</InstdAgt>
<Dbtr>
<Nm>KITCHENAID EUROPA, INC.</Nm>
<PstlAdr>
<AdrLine>2/NIJVERHEIDSLAAN 3 5</AdrLine>
<AdrLine>3/BE/1853 STROMBEEK-BEVER</AdrLine>
</PstlAdr>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>BE50001888300818</IBAN>
</Id>
</DbtrAcct>
<DbtrAgt>
<FinInstnId>
<BICFI>GEBABEBB36A</BICFI>
</FinInstnId>
</DbtrAgt>
<CdtrAgt>
<FinInstnId>
<BICFI>NYCBCNSH</BICFI>
</FinInstnId>
</CdtrAgt>
<CdtrAgtAcct>
<Id>
<Othr>
<Id>000793617432</Id>
</Othr>
</Id>
</CdtrAgtAcct>
<Cdtr>
<Nm>CRASTAL TRADING LTD</Nm>
<PstlAdr>
<AdrLine>000000 SAN PO KONG, KOWLOON HONG KO</AdrLine>
<AdrLine>NG</AdrLine>
<AdrLine>HK</AdrLine>
</PstlAdr>
</Cdtr>
<CdtrAcct>
<Id>
<Othr>
<Id>04390510264614</Id>
</Othr>
</Id>
</CdtrAcct>
<RmtInf>
<Ustrd>90300928A//</Ustrd>
</RmtInf>
</CdtTrfTxInf>
</FIToFICstmrCdtTrf>
</Document>
<!-- {1:F01NYCBCNSHXXXX0000000000}{2:O1030801230427BNPAUS3NXXXX00000000002304270801N}{3:{111:001}{121:dbc916b7-6c47-4935-8253-f4ffb4ff319b}}{4:^~:20:PAY230427C013150^~:23B:CRED^~:23E:SDVA^~:32A:230427USD115401,^~:33B:USD115401,^~:50F:/BE50001888300818^~1/KITCHENAID EUROPA, INC.^~2/NIJVERHEIDSLAAN 3 5^~3/BE/1853 STROMBEEK-BEVER^~:52A:GEBABEBB36A^~:54A:CHASUS33^~:57A:/000793617432^~NYCBCNSH^~:59:/04390510264614^~CRASTAL TRADING LTD^~000000 SAN PO KONG, KOWLOON HONG KO^~NG^~HK^~:70:/ROC/3251025000180623///URI/9030092^~8A//^~:71A:OUR^~:72:/INS/GEBABEBB36A^~-}{5:{CHK:993AF4D855D5}} --><!-- TranslationResult=TRAK --><!-- TranslationInfo version 1.0.0.1
{
"errors": [
{
"code": "TRAK",
"message": "IGNORED.T0000M Input content is ignored.\r\nValue '<TxId>2023042700006390</TxId>' has been dropped.\r\nInput path: Document/FIToFICstmrCdtTrf/CdtTrfTxInf/PmtId/TxId",
"path": "MT103CORE"
},
{
"code": "TRAK",
"message": "IGNORED.T0000M Input content is ignored.\r\nValue '<InstrPrty>NORM</InstrPrty>' has been dropped.\r\nInput path: Document/FIToFICstmrCdtTrf/CdtTrfTxInf/PmtTpInf/InstrPrty",
"path": "MT103CORE"
},
{
"code": "TRAK",
"message": "IGNORED.T0000M Input content is ignored.\r\nValue '<SttlmPrty>URGT</SttlmPrty>' has been dropped.\r\nInput path: Document/FIToFICstmrCdtTrf/CdtTrfTxInf/SttlmPrty",
"path": "MT103CORE"
}
]
}
--></Saa:Body></Saa:DataPDU>
\ No newline at end of file
......@@ -36,7 +36,7 @@ Change Log
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.08">
<FIToFICstmrCdtTrf>
<GrpHdr>
<MsgId>pacs8bizmsgidr01</MsgId>
<MsgId>pacs8bizmsgidr01</MsgId>
<CreDtTm>2021-04-09T09:00:00+01:00</CreDtTm>
<NbOfTxs>1</NbOfTxs>
<SttlmInf>
......@@ -49,11 +49,20 @@ Change Log
<InstrId>pacs8bizmsgidr01</InstrId>
<EndToEndId>pacs008EndToEndId-001</EndToEndId>
<UETR>8a562c67-ca16-48ba-b074-65581be6f001</UETR>
</PmtId>
</PmtId>
<PmtTpInf>
<SvcLvl>
<Cd>G001</Cd>
</SvcLvl>
<SvcLvl>
<Cd>G002</Cd>
</SvcLvl>
</PmtTpInf>
<IntrBkSttlmAmt Ccy="EUR">15000000</IntrBkSttlmAmt>
<IntrBkSttlmDt>2021-04-09</IntrBkSttlmDt>
<InstdAmt Ccy="EUR">11111</InstdAmt>
<ChrgBr>DEBT</ChrgBr>
<ChrgBr>DEBT</ChrgBr>
<InstgAgt>
<FinInstnId>
<BICFI>RBOSGB2LXXX</BICFI>
......
#APPLICATION HEADER
#??
# @??????
# &???????
# #?????????
#
frBic=appHdr.fr.fiId.finInstnId.bicfi
toBic=appHdr.to.fiId.finInstnId.bicfi
bizMsgIdr=fiToFICstmrCdtTrf.cdtTrfTxInf.pmtId.instrId?fiToFICstmrCdtTrf.grpHdr.msgId?appHdr.bizMsgIdr
......
bicfi=finInstnId.bicfi
clrSysId=finInstnId.clrSysMmbId.mmbId
clrSysIdType=finInstnId.clrSysMmbId.clrSysId.cd
clrSysIdTypePrtry=finInstnId.clrSysMmbId.clrSysId.prtry
lei=finInstnId.lei
nm=finInstnId.nm
pstlAdrType=finInstnId.pstlAdr.adrTp.cd
pstlAdrCtry=finInstnId.pstlAdr.ctry
pstlAdrDept=finInstnId.pstlAdr.dept
pstlAdrSubDept=finInstnId.pstlAdr.subDept
pstlAdrStrtNm=finInstnId.pstlAdr.strtNm
pstlAdrBldgNb=finInstnId.pstlAdr.bldgNb
pstlAdrBldgNm=finInstnId.pstlAdr.bldgNm
pstlAdrFlr=finInstnId.pstlAdr.flr
pstlAdrRoom=finInstnId.pstlAdr.room
pstlAdrTwnNm=finInstnId.pstlAdr.twnNm
pstlAdrPstBx=finInstnId.pstlAdr.pstBx
pstlAdrPstCd=finInstnId.pstlAdr.pstCd
pstlAdrCtrySubDvsn=finInstnId.pstlAdr.ctrySubDvsn
pstlAdrDstrctNm=finInstnId.pstlAdr.dstrctNm
pstlAdrTwnLctnNm=finInstnId.pstlAdr.twnLctnNm
adrLines=finInstnId.pstlAdr.AdrLine
othrId=finInstnId.othr.id
othrIdType=finInstnId.othr.schmeNm.cd
othrIdTypePrtry=finInstnId.othr.schmeNm.prtry
brnchId=brnchId.id
brnchLei=brnchId.lei
brnchNm=brnchId.nm
brnchPstlAdrType=brnchId.pstlAdr.adrTp.cd
brnchPstlAdrCtry=brnchId.pstlAdr.ctry
brnchPstlAdrDept=brnchId.pstlAdr.dept
brnchPstlAdrSubDept=brnchId.pstlAdr.subDept
brnchPstlAdrStrtNm=brnchId.pstlAdr.strtNm
brnchPstlAdrBldgNb=brnchId.pstlAdr.bldgNb
brnchPstlAdrBldgNm=brnchId.pstlAdr.bldgNm
brnchPstlAdrFlr=brnchId.pstlAdr.flr
brnchPstlAdrRoom=brnchId.pstlAdr.room
brnchPstlAdrTwnNm=brnchId.pstlAdr.twnNm
brnchPstlAdrPstBx=brnchId.pstlAdr.pstBx
brnchPstlAdrPstCd=brnchId.pstlAdr.pstCd
brnchPstlAdrCtrySubDvsn=brnchId.pstlAdr.ctrySubDvsn
brnchPstlAdrDstrctNm=brnchId.pstlAdr.dstrctNm
brnchPstlAdrTwnLctnNm=brnchId.pstlAdr.twnLctnNm
brnchAdrLines=brnchId.pstlAdr.AdrLine
\ No newline at end of file
amt=amt.value&bigdecimal
ccy=amt.ccy
bicfi=agt.finInstnId.bicfi
\ No newline at end of file
ntryRef=ntryRef
ntryAmt=amt.value&bigdecimal?ntryDtls.txDtls.amt.value&bigdecimal
ntryCcy=amt.ccy?ntryDtls.txDtls.amt.ccy
ntryCdtDbtInd=cdtDbtInd?ntryDtls.txDtls.cdtDbtInd
ntryRvslInd=rvslInd&boolean
ntrySts=sts.cd
ntryStsPrtry=sts.prtry
ntryBookgDt=bookgDt.dt
ntryBookgDtTm=bookgDt.dtTm
ntryValDt=valDt.dt
ntryValDtTm=valDt.dtTm
ntryAcctSvcrRef=acctSvcrRef
ntryBkTxCdDomnCd=bkTxCd.domn.cd
ntryBkTxCdFmlyCd=bkTxCd.domn.fmly.cd
ntryBkTxCdFmlySubFmlyCd=bkTxCd.domn.fmly.subFmlyCd
ntryBkTxCdPrtryCd=bkTxCd.prtry.cd
endToEndId=ntryDtls.txDtls.refs.endToEndId
addtlTxInf=ntryDtls.txDtls.addtlTxInf
instrId=ntryDtls.txDtls.refs.instrId
ntryUetr=ntryDtls.txDtls.refs.uetr
ntryTxId=ntryDtls.txDtls.refs.txId
\ No newline at end of file
nm=nm
orgAnyBIC=id.orgId.anyBIC
orgLei=id.orgId.lei
orgOthrId=id.orgId.othr.id
orgOthrIdType=id.orgId.othr.schmeNm.cd
orgOthrIdTypePrtry=id.orgId.othr.schmeNm.prtry
prvtBirthDt=id.prvtId.dtAndPlcOfBirth.birthDt
prvtPrvcOfBirth=id.prvtId.dtAndPlcOfBirth.prvcOfBirth
prvtCityOfBirth=id.prvtId.dtAndPlcOfBirth.cityOfBirth
prvtCtryOfBirth=id.prvtId.dtAndPlcOfBirth.ctryOfBirth
prvtId=id.prvtId.othr.id
prvtIdType=id.prvtId.othr.schmeNm.cd
prvtIdTypePrtry=id.prvtId.othr.schmeNm.prtry
ctryOfRes=ctryOfRes
pstlAdrType=pstlAdr.adrTp.cd
pstlAdrCtry=pstlAdr.ctry
pstlAdrDept=pstlAdr.dept
pstlAdrSubDept=pstlAdr.subDept
pstlAdrStrtNm=pstlAdr.strtNm
pstlAdrBldgNb=pstlAdr.bldgNb
pstlAdrBldgNm=pstlAdr.bldgNm
pstlAdrFlr=pstlAdr.flr
pstlAdrRoom=pstlAdr.room
pstlAdrTwnNm=pstlAdr.twnNm
pstlAdrPstBx=pstlAdr.pstBx
pstlAdrPstCd=pstlAdr.pstCd
pstlAdrCtrySubDvsn=pstlAdr.ctrySubDvsn
pstlAdrDstrctNm=pstlAdr.dstrctNm
pstlAdrTwnLctnNm=pstlAdr.twnLctnNm
adrLines=pstlAdr.adrLine
phneNb=ctctDtls.phneNb
mobNb=ctctDtls.mobNb
faxNb=ctctDtls.faxNb
emailAdr=ctctDtls.emailAdr
......@@ -46,7 +46,7 @@ public class Element2MxTest {
map.put("messageType", msgDefIdr.replace(".",""));
map.put("msgDefIdr",msgDefIdr);
map.put("bizMsgIdr", "BizTest00001");
map.put("mgDefIdr", "BizTest00001");
map.put("msgDefIdr", "BizTest00002");
map.put("bizSvc", "swift.cbprplus.02");
map.put("msgId", "MsgId00001");
......@@ -191,7 +191,7 @@ public class Element2MxTest {
}
@Test
/* @Test
public void testElement2Pacs00900108() throws IOException, ParseException, DatatypeConfigurationException {
Map map = new HashMap();
......@@ -251,7 +251,7 @@ public class Element2MxTest {
map.put("rmtInfUstrd", rmtInfoUstrdList);
//mt103 72附言 ---Begin
/*
*//*
instrForCdtrAgt 付款指示
instrForNxtAgt 下一个代理行指令
svcLvl 交易所依据的服务
......@@ -263,7 +263,7 @@ public class Element2MxTest {
prvsInstgAgt2Acct 之前的发报行2账户
prvsInstgAgt3 之前的发报行3
prvsInstgAgt3Acct 之前的发报行3账户
*/
*//*
//付款指示
List instrForCdtrAgtList = new LinkedList();
Map instrForCdtrAgtMap = new HashMap();
......@@ -334,7 +334,7 @@ public class Element2MxTest {
// String xmlStr = new Element2MxCreatorManager().element2Mx(elementStr);
// System.out.println("iso======"+xmlStr);
}
}*/
@Test
public void testRefreshValue() {
......
package com.brilliance;
import com.brilliance.swift.util.XmlUtil;
import org.apache.commons.io.FileUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.junit.Test;
import java.io.File;
import java.util.Map;
public class ParseISOTest {
@Test
public void testParseIsoXml() throws Exception {
File file = FileUtils.toFile(ParseISOTest.class.getResource("/swiftXml/NcPacs00800108.xml"));
String xmlStr = FileUtils.readFileToString(file);
Document document = DocumentHelper.parseText(xmlStr);
Map<String, String> parentElementMaps = XmlUtil.getParentElementMaps(document);
System.out.println("isoMaps="+parentElementMaps);
String bodyParentElementName = parentElementMaps.get("CdtTrfTxInf");
String endToEndId = XmlUtil.getXmlNodeValue(document, bodyParentElementName + ".CdtTrfTxInf.PmtId.EndToEndId");
System.out.println("endToEndId="+endToEndId);
String ownrefParentElentName=parentElementMaps.get("InstrId");
String ownref=XmlUtil.getXmlNodeValue(document,ownrefParentElentName+".InstrId");
System.out.println("ownref="+ownref);
}
}
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