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
a786c1a1
Commit
a786c1a1
authored
Dec 25, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加sys011,sys012报文解析成map
parent
8213c119
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
220 additions
and
2 deletions
+220
-2
Mx2ElementCreatorManager.java
...brilliance/swift/mx2element/Mx2ElementCreatorManager.java
+8
-2
Mx2ElementXsys011001Creator.java
...ft/mx2element/xsys011001/Mx2ElementXsys011001Creator.java
+12
-0
Mx2ElementXsys012001Creator.java
.../mx2element/xsys01200101/Mx2ElementXsys012001Creator.java
+12
-0
xsys01100101.xml
swiftCore/src/main/resources/swiftXml/xsys01100101.xml
+57
-0
xsys01200101.xml
swiftCore/src/main/resources/swiftXml/xsys01200101.xml
+60
-0
xsys011001.properties
swiftCore/src/main/resources/template/xsys011001.properties
+14
-0
xsys012001.properties
swiftCore/src/main/resources/template/xsys012001.properties
+13
-0
Mx2MapTest.java
swiftCore/src/test/java/com/brilliance/Mx2MapTest.java
+44
-0
No files found.
swiftCore/src/main/java/com/brilliance/swift/mx2element/Mx2ElementCreatorManager.java
View file @
a786c1a1
...
...
@@ -12,6 +12,8 @@ import com.brilliance.swift.mx2element.pacs002001.Mx2ElementPacs002001Creator;
import
com.brilliance.swift.mx2element.pacs004001.Mx2ElementPacs004001Creator
;
import
com.brilliance.swift.mx2element.pacs008001.Mx2ElementPacs008001Creator
;
import
com.brilliance.swift.mx2element.pacs009001.Mx2ElementPacs009001Creator
;
import
com.brilliance.swift.mx2element.xsys011001.Mx2ElementXsys011001Creator
;
import
com.brilliance.swift.mx2element.xsys01200101.Mx2ElementXsys012001Creator
;
import
com.brilliance.swift.util.XmlUtil
;
import
com.google.gson.Gson
;
import
com.google.gson.GsonBuilder
;
...
...
@@ -69,9 +71,13 @@ public class Mx2ElementCreatorManager {
return
new
Mx2ElementCamt057001Creator
();
}
else
if
(
messageType
.
matches
(
"camt060001[0-9]{2}"
))
{
return
new
Mx2ElementCamt060001Creator
();
}
else
if
(
messageType
.
matches
(
"camt052001[0-9]{2}"
))
{
}
else
if
(
messageType
.
matches
(
"camt052001[0-9]{2}"
))
{
return
new
Mx2ElementCamt052001Creator
();
}
else
{
}
else
if
(
messageType
.
matches
(
"xsys011001[0-9]{2}"
))
{
return
new
Mx2ElementXsys011001Creator
();
}
else
if
(
messageType
.
matches
(
"xsys012001[0-9]{2}"
))
{
return
new
Mx2ElementXsys012001Creator
();
}
else
{
throw
new
SwiftException
(
"无效的MX报文类型"
);
}
}
...
...
swiftCore/src/main/java/com/brilliance/swift/mx2element/xsys011001/Mx2ElementXsys011001Creator.java
0 → 100644
View file @
a786c1a1
package
com
.
brilliance
.
swift
.
mx2element
.
xsys011001
;
import
com.brilliance.swift.mx2element.AbstractMx2ElementCreator
;
import
java.util.Map
;
public
class
Mx2ElementXsys011001Creator
extends
AbstractMx2ElementCreator
{
@Override
public
Map
<
String
,
Object
>
buildElement
()
{
return
super
.
buildElement
();
}
}
swiftCore/src/main/java/com/brilliance/swift/mx2element/xsys01200101/Mx2ElementXsys012001Creator.java
0 → 100644
View file @
a786c1a1
package
com
.
brilliance
.
swift
.
mx2element
.
xsys01200101
;
import
com.brilliance.swift.mx2element.AbstractMx2ElementCreator
;
import
java.util.Map
;
public
class
Mx2ElementXsys012001Creator
extends
AbstractMx2ElementCreator
{
@Override
public
Map
<
String
,
Object
>
buildElement
()
{
return
super
.
buildElement
();
}
}
swiftCore/src/main/resources/swiftXml/xsys01100101.xml
0 → 100644
View file @
a786c1a1
<?xml version="1.0" encoding="UTF-8"?>
<SwInt:HandleRequest
xmlns:Sw=
"urn:swift:snl:ns.Sw"
xmlns:SwInt=
"urn:swift:snl:ns.SwInt"
>
<SwInt:RequestHandle>
<SwInt:RequestDescriptor>
<SwInt:SwiftRequestRef>
SNL00110-2010-05-04T15:31:37.3172.000004Z
</SwInt:SwiftRequestRef>
<SwInt:SwiftRef>
swi00001-2010-05-04T15:31:37.22284.11144096Z
</SwInt:SwiftRef>
<Sw:SnFOutputInfo>
<Sw:SnFSessionId>
simxbebb_generic:p:000047
</Sw:SnFSessionId>
<Sw:SnFOutputSeq>
2337174
</Sw:SnFOutputSeq>
<Sw:DeliveryTime>
2010-05-04T15:31:43Z
</Sw:DeliveryTime>
<Sw:SnFInputTime>
0105:2010-05-04T15:31:41
</Sw:SnFInputTime>
</Sw:SnFOutputInfo>
<SwInt:MRRResult>
<SwInt:SNLId>
snl00110
</SwInt:SNLId>
<SwInt:SNLEP>
spark_ap2
</SwInt:SNLEP>
</SwInt:MRRResult>
</SwInt:RequestDescriptor>
<SwInt:RequestHeader>
<SwInt:Requestor>
cn=system,o=swift,o=swift
</SwInt:Requestor>
<SwInt:Responder>
cn=requestor,o=simxbebb,o=swift
</SwInt:Responder>
<SwInt:Service>
swift.snf.system
</SwInt:Service>
<SwInt:RequestType>
xsys.011.001.01
</SwInt:RequestType>
<SwInt:Priority>
Normal
</SwInt:Priority>
</SwInt:RequestHeader>
<SwInt:RequestPayload>
<Ah:AppHdr
xmlns:Ah=
"urn:swift:xsd:$ahV10"
>
<Ah:MsgRef>
2010-05-04T15:31:41Z
</Ah:MsgRef>
<Ah:CrDate>
2010-05-04T15:31:41Z
</Ah:CrDate>
</Ah:AppHdr>
<Doc:Document
xmlns:Doc=
"urn:swift:xsd:xsys.011.001.01"
xmlns:Sw=
"urn:swift:snl:ns.Sw"
xmlns:SwInt=
"urn:swift:snl:ns.SwInt"
>
<Doc:xsys.011.001.01>
<Doc:DlvryNtfctn>
<Sw:SnFRef>
swi00001-2010-05-04T15:31:37.22284.11144096Z
</Sw:SnFRef>
<Sw:SnFRefType>
InterAct
</Sw:SnFRefType>
<Sw:AcceptStatus>
Accepted
</Sw:AcceptStatus>
<Sw:AckSwiftTime>
2010-05-04T15:31:41Z
</Sw:AckSwiftTime>
<SwInt:RequestHeader>
<SwInt:Requestor>
cn=requestor,o=simxbebb,o=swift
</SwInt:Requestor>
<SwInt:Responder>
cn=responder,o=simxus33,o=swift
</SwInt:Responder>
<SwInt:Service>
mnop.cop
</SwInt:Service>
<SwInt:RequestType>
pain.002.002.01
</SwInt:RequestType>
<SwInt:Priority>
Normal
</SwInt:Priority>
<SwInt:RequestRef>
Ref-3992
</SwInt:RequestRef>
</SwInt:RequestHeader>
</Doc:DlvryNtfctn>
</Doc:xsys.011.001.01>
</Doc:Document>
</SwInt:RequestPayload>
</SwInt:RequestHandle>
</SwInt:HandleRequest>
\ No newline at end of file
swiftCore/src/main/resources/swiftXml/xsys01200101.xml
0 → 100644
View file @
a786c1a1
<?xml version="1.0" encoding="UTF-8"?>
<SwInt:HandleRequest
xmlns:Sw=
"urn:swift:snl:ns.Sw"
xmlns:SwInt=
"urn:swift:snl:ns.SwInt"
>
<SwInt:RequestHandle>
<SwInt:RequestDescriptor>
<SwInt:SwiftRequestRef>
SNL00110-2010-05-04T15:32:59.3912.000004Z
</SwInt:SwiftRequestRef>
<SwInt:SwiftRef>
swi00001-2010-05-04T15:32:59.21582.11198379Z
</SwInt:SwiftRef>
<SwInt:NonRep>
<SwInt:NRType>
SVCOPT
</SwInt:NRType>
</SwInt:NonRep>
<Sw:SnFOutputInfo>
<Sw:SnFSessionId>
simxbebb_generic:p:000047
</Sw:SnFSessionId>
<Sw:SnFOutputSeq>
2337176
</Sw:SnFOutputSeq>
<Sw:DeliveryTime>
2010-05-04T15:33:14Z
</Sw:DeliveryTime>
<Sw:SnFInputTime>
0105:2010-05-04T15:33:12
</Sw:SnFInputTime>
</Sw:SnFOutputInfo>
<SwInt:MRRResult>
<SwInt:SNLId>
snl00110
</SwInt:SNLId>
<SwInt:SNLEP>
spark_ap2
</SwInt:SNLEP>
</SwInt:MRRResult>
</SwInt:RequestDescriptor>
<SwInt:RequestHeader>
<SwInt:Requestor>
cn=system,o=swift,o=swift
</SwInt:Requestor>
<SwInt:Responder>
cn=requestor,o=simxbebb,o=swift
</SwInt:Responder>
<SwInt:Service>
swift.snf.system
</SwInt:Service>
<SwInt:RequestType>
xsys.012.001.01
</SwInt:RequestType>
<SwInt:Priority>
Normal
</SwInt:Priority>
</SwInt:RequestHeader>
<SwInt:RequestPayload>
<Ah:AppHdr
xmlns:Ah=
"urn:swift:xsd:$ahV10"
>
<Ah:MsgRef>
2010-05-04T15:33:12Z
</Ah:MsgRef>
<Ah:CrDate>
2010-05-04T15:33:12Z
</Ah:CrDate>
</Ah:AppHdr>
<Doc:Document
xmlns:Doc=
"urn:swift:xsd:xsys.012.001.01"
xmlns:Sw=
"urn:swift:snl:ns.Sw"
xmlns:SwInt=
"urn:swift:snl:ns.SwInt"
>
<Doc:xsys.012.001.01>
<Doc:DlvryNtfctn>
<Sw:SnFRef>
swi00001-2010-05-04T15:32:59.21582.11198379Z
</Sw:SnFRef>
<Sw:SnFRefType>
InterAct
</Sw:SnFRefType>
<Sw:AcceptStatus>
Failed
</Sw:AcceptStatus>
<Sw:AckSwiftTime>
2010-05-04T15:33:12Z
</Sw:AckSwiftTime>
<Sw:AckDescription>
Message delivery attempts exceeded system threshold
</Sw:AckDescription>
<Sw:AckInfo>
SwRejectcode=SwGbl.MaxRetryExceeded
</Sw:AckInfo>
<SwInt:RequestHeader>
<SwInt:Requestor>
cn=requestor,o=simxbebb,o=swift
</SwInt:Requestor>
<SwInt:Responder>
cn=responder,o=simxus33,o=swift
</SwInt:Responder>
<SwInt:Service>
mnop.cop
</SwInt:Service>
<SwInt:RequestType>
pain.001.002.04
</SwInt:RequestType>
<SwInt:Priority>
Normal
</SwInt:Priority>
<SwInt:RequestRef>
Ref-84884
</SwInt:RequestRef>
</SwInt:RequestHeader>
</Doc:DlvryNtfctn>
</Doc:xsys.012.001.01>
</Doc:Document>
</SwInt:RequestPayload>
</SwInt:RequestHandle>
</SwInt:HandleRequest>
\ No newline at end of file
swiftCore/src/main/resources/template/xsys011001.properties
0 → 100644
View file @
a786c1a1
# ??????? ?origSnFRef????origSnFRef????snFRef
snFRef
=
xsys01100101.dlvryNtfctn.snFRef
origSnFRef
=
xsys01100101.dlvryNtfctn.origSnFRef
snFRefType
=
xsys01100101.dlvryNtfctn.snFRefType
acceptStatus
=
xsys01100101.dlvryNtfctn.acceptStatus
ackSwiftTime
=
xsys01100101.dlvryNtfctn.ackSwiftTime
requestor
=
xsys01100101.dlvryNtfctn.requestHeader.requestor
responder
=
xsys01100101.dlvryNtfctn.requestHeader.responder
service
=
xsys01100101.dlvryNtfctn.requestHeader.service
requestType
=
xsys01100101.dlvryNtfctn.requestHeader.requestType
priority
=
xsys01100101.dlvryNtfctn.requestHeader.priority
requestRef
=
xsys01100101.dlvryNtfctn.requestHeader.requestRef
swiftCore/src/main/resources/template/xsys012001.properties
0 → 100644
View file @
a786c1a1
# ??????? ?origSnFRef????origSnFRef????snFRef
snFRef
=
xsys01200101.dlvryNtfctn.snFRef
origSnFRef
=
xsys01200101.dlvryNtfctn.origSnFRef
snFRefType
=
xsys01200101.dlvryNtfctn.snFRefType
acceptStatus
=
xsys01200101.dlvryNtfctn.acceptStatus
ackSwiftTime
=
xsys01200101.dlvryNtfctn.ackSwiftTime
requestor
=
xsys01200101.dlvryNtfctn.requestHeader.requestor
responder
=
xsys01200101.dlvryNtfctn.requestHeader.responder
service
=
xsys01200101.dlvryNtfctn.requestHeader.service
requestType
=
xsys01200101.dlvryNtfctn.requestHeader.requestType
priority
=
xsys01200101.dlvryNtfctn.requestHeader.priority
requestRef
=
xsys01200101.dlvryNtfctn.requestHeader.requestRef
swiftCore/src/test/java/com/brilliance/Mx2MapTest.java
0 → 100644
View file @
a786c1a1
package
com
.
brilliance
;
import
com.brilliance.swift.SwiftTransfer
;
import
org.apache.commons.io.FileUtils
;
import
org.junit.Test
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.Map
;
/**
* @Description
* @Author s_guodong
* @Date 2023/12/22
*/
public
class
Mx2MapTest
{
/**
* ack报文
*
* @throws IOException
*/
@Test
public
void
test_xsys011
()
throws
IOException
{
File
file
=
FileUtils
.
toFile
(
Mx2MtTest
.
class
.
getResource
(
"/swiftXml/xsys01100101.xml"
));
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
System
.
out
.
println
(
elementMaps
);
}
/**
* nck报文
*
* @throws IOException
*/
@Test
public
void
test_xsys012
()
throws
IOException
{
File
file
=
FileUtils
.
toFile
(
Mx2MtTest
.
class
.
getResource
(
"/swiftXml/xsys01200101.xml"
));
String
xmlStr
=
FileUtils
.
readFileToString
(
file
);
Map
<
String
,
Object
>
elementMaps
=
SwiftTransfer
.
mx2ElementMaps
(
xmlStr
);
System
.
out
.
println
(
elementMaps
);
}
}
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