Commit 22db93c5 by gechengyang

提交head00100102.xsd

parent 6594cfa5
......@@ -14,6 +14,7 @@ Change Log
-->
<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">
<CharSet>UTF-8</CharSet>
<Fr>
<FIId>
<FinInstnId>
......@@ -31,16 +32,16 @@ Change Log
<BizMsgIdr>pacs8bizmsgidr01</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
<CreDt>2021-04-09T09:00:00+01:00</CreDt>
<CharSet>A</CharSet>
<MktPrctc>
<Regy>test</Regy>
<Id>1234</Id>
</MktPrctc>
<CreDt>2021-04-09T09:00:00+01:00</CreDt>
<CpyDplct>CODU</CpyDplct>
<PssblDplct>Yes</PssblDplct>
<PssblDplct>true</PssblDplct>
<Prty>HIGH</Prty>
<Rltd>
<CharSet>UTF-8</CharSet>
<Fr>
<FIId>
<FinInstnId>
......@@ -51,7 +52,7 @@ Change Log
</ClrSysId>
<MmbId>ClrSysMmbId002</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
</FinInstnId>
</FIId>
</Fr>
......@@ -65,11 +66,11 @@ Change Log
</ClrSysId>
<MmbId>ClrSysMmbId003</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
</FinInstnId>
</FIId>
</To>
<CharSet>A</CharSet>
<!-- <CharSet>A</CharSet>-->
<BizMsgIdr>pacs8bizmsgidr02</BizMsgIdr>
<MsgDefIdr>pacs.008.001.08</MsgDefIdr>
<BizSvc>swift.cbprplus.02</BizSvc>
......@@ -121,7 +122,7 @@ Change Log
</ClrSysId>
<MmbId>ClrSysMmbId001</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>123456789012345678</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -177,7 +178,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB002</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId002</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -233,7 +234,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB003</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId003</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -333,7 +334,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB005</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId004</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -364,7 +365,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB006</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId005</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -420,7 +421,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB007</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId006</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -476,7 +477,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB008</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId007</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -532,7 +533,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB008</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
</FinInstnId>
</InstgAgt>
<InstdAgt>
......@@ -544,7 +545,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB007</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
</FinInstnId>
</InstdAgt>
<IntrmyAgt1>
......@@ -556,7 +557,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB009</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId008</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -612,7 +613,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB010</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId009</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -668,7 +669,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB011</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId010</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -736,7 +737,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr010</Id>
<SchmeNm>
......@@ -786,7 +787,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr012</Id>
<SchmeNm>
......@@ -837,7 +838,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr014</Id>
<SchmeNm>
......@@ -899,7 +900,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB011</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId011</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -955,7 +956,7 @@ Change Log
</ClrSysId>
<MmbId>AUBSB011</MmbId>
</ClrSysMmbId>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Nm>FinInstnId012</Nm>
<PstlAdr>
<Dept>PstlAdr001</Dept>
......@@ -1027,7 +1028,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr019</Id>
<SchmeNm>
......@@ -1103,7 +1104,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr022</Id>
<SchmeNm>
......@@ -1294,7 +1295,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr024</Id>
<SchmeNm>
......@@ -1344,7 +1345,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr026</Id>
<SchmeNm>
......@@ -1467,7 +1468,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr028</Id>
<SchmeNm>
......@@ -1517,7 +1518,7 @@ Change Log
<Id>
<OrgId>
<AnyBIC>CHASUS33</AnyBIC>
<LEI>123456789012345678</LEI>
<LEI>LE345678901234567812</LEI>
<Othr>
<Id>Othr030</Id>
<SchmeNm>
......
......@@ -3,11 +3,13 @@
<xs:element name="AppHdr" type="BusinessApplicationHeaderV02"/>
<xs:complexType name="BusinessApplicationHeaderV02">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="CharSet" type="Max35Text"/>
<xs:element name="Fr" type="Party44Choice"/>
<xs:element name="To" type="Party44Choice"/>
<xs:element name="BizMsgIdr" type="Max35Text"/>
<xs:element name="MsgDefIdr" type="Max35Text"/>
<xs:element name="BizSvc" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="MktPrctc" type="ImplementationSpecification1"/>
<xs:element name="CreDt" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="CpyDplct" type="CopyDuplicate1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="PssblDplct" type="YesNoIndicator"/>
......@@ -15,6 +17,14 @@
<xs:element maxOccurs="1" minOccurs="0" name="Rltd" type="BusinessApplicationHeader5"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ImplementationSpecification1">
<xs:sequence>
<xs:element name="Regy" type="Max350Text"/>
<xs:element name="Id" type="Max2048Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Party44Choice">
<xs:choice>
<xs:element name="OrgId" type="PartyIdentification135"/>
......@@ -38,6 +48,7 @@
</xs:complexType>
<xs:complexType name="BusinessApplicationHeader5">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="CharSet" type="Max35Text"/>
<xs:element name="Fr" type="Party44Choice"/>
<xs:element name="To" type="Party44Choice"/>
<xs:element name="BizMsgIdr" type="Max35Text"/>
......@@ -174,6 +185,14 @@
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max350Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="350"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
......
......@@ -6,12 +6,14 @@ import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MxXsdValidator {
@Test
public void testPacs008001() {
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/mxjson/Pacs00800108.xml"));
boolean flag = SwiftTransfer.validateMx(file);
System.out.println(flag);
}
......@@ -21,4 +23,14 @@ public class MxXsdValidator {
File file = FileUtils.toFile(Mx2MtTest.class.getResource("/swiftXml/MxPacs00800108.xml"));
System.out.println(SwiftTransfer.fetchFinFromMixMessage(file));
}
@Test
public void generateAppHdrXsd() throws Exception {
String str="LE345678901234567812";
Pattern pattern=Pattern.compile("[A-Z0-9]{18,18}[0-9]{2,2}");
Matcher m = pattern.matcher(str);
System.out.println(m.find());
}
}
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