Commit 8b1c110d by lixinyi

新增cips111、112报文界面,新增cips组报、检核功能

parent 4a54d03d
...@@ -2,77 +2,100 @@ import link from "./service" ...@@ -2,77 +2,100 @@ import link from "./service"
export default{ export default{
sendSWiftMes(data){ sendSWiftMes(data){
return new link({ return new link({
url:`/msgsend`, url:`/swift/msgsend`,
method:"post", method:"post",
data:data data:data
}) })
}, },
saveSWiftMes(data){ saveSWiftMes(data){
return new link({ return new link({
url:`/msgsave`, url:`/swift/msgsave`,
method:"post", method:"post",
data:data data:data
}) })
}, },
validateSWiftMes(data){ validateSWiftMes(data){
return new link({ return new link({
url:`/msgvalidate`, url:`/swift/msgvalidate`,
method:"post", method:"post",
data:data data:data
}) })
}, },
mx2mt(data){ mx2mt(data){
return new link({ return new link({
url:`/mx2mt`, url:`/swift/mx2mt`,
method:"post", method:"post",
data:data data:data
}) })
}, },
mxType(data){ mxType(data){
return new link({ return new link({
url:`/mxType`, url:`/swift/mxType`,
method:"post", method:"post",
data:data data:data
}) })
}, },
mt2mx(data){ mt2mx(data){
return new link({ return new link({
url:`/mt2mx`, url:`/swift/mt2mx`,
method:"post", method:"post",
data:data data:data
}) })
}, },
mx2Json(data){ mx2Json(data){
return new link({ return new link({
url:`/mx2Json`, url:`/swift/mx2Json`,
method:"post", method:"post",
data:data data:data
}) })
}, },
saveTemplate(data){ saveTemplate(data){
return new link({ return new link({
url:`/saveTemplate`, url:`/swift/saveTemplate`,
method:"post", method:"post",
data:data data:data
}) })
}, },
getTemplate(data){ getTemplate(data){
return new link({ return new link({
url:`/getTemplate`, url:`/swift/getTemplate`,
method:"post", method:"post",
data:data data:data
}) })
}, },
getCancelOriginalMsgInfos(data){ getCancelOriginalMsgInfos(data){
return new link({ return new link({
url:`/getCancelOriginalMsgInfos`, url:`/swift/getCancelOriginalMsgInfos`,
method:"post", method:"post",
data:data data:data
}) })
}, },
getFillElements(data){ getFillElements(data){
return new link({ return new link({
url:`/getFillElements`, url:`/swift/getFillElements`,
method:"post",
data:data
})
},
sendCipsMes(data){
return new link({
url:`/cips/msgsend`,
method:"post",
data:data
})
},
saveCipsMes(data){
return new link({
url:`/cips/msgsave`,
method:"post",
data:data
})
},
validateCipsMes(data){
return new link({
url:`/cips/msgvalidate`,
method:"post", method:"post",
data:data data:data
}) })
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
import axios from 'axios' import axios from 'axios'
const service = axios.create({ const service = axios.create({
// baseURL: '/swift-editor-1.0.0/swift', //代理 // baseURL: '/swift-editor-1.0.0', //代理
baseURL: '/swift-editor/swift', //本地用这个 baseURL: '/swift-editor', //本地用这个
timeout: 50000 // request timeout timeout: 50000 // request timeout
}) })
......
...@@ -20,6 +20,11 @@ export default { ...@@ -20,6 +20,11 @@ export default {
this.$set(this.dataModel, 'value', this.$moment(new Date()).format("YYYY-MM-DDTHH:mm:ss.SSS+08:00")); this.$set(this.dataModel, 'value', this.$moment(new Date()).format("YYYY-MM-DDTHH:mm:ss.SSS+08:00"));
console.log(this.dataModel.value); console.log(this.dataModel.value);
} }
if (this.dateType=== 'date' && this.dataModel.tag === 'XpctdSttlmDt' && this.dataModel.defaultValue != 'disabled') {
this.$delete(this.dataModel, 'value');
this.$set(this.dataModel, 'value', this.$moment(new Date()).format("YYYY-MM-DD"));
console.log(this.dataModel.value);
}
}, },
} }
</script> </script>
\ No newline at end of file
...@@ -5,6 +5,7 @@ import Time from "./Time.vue"; ...@@ -5,6 +5,7 @@ import Time from "./Time.vue";
import Date from "./Date.vue"; import Date from "./Date.vue";
import List from "./List.vue"; import List from "./List.vue";
import Amount from "./Amount.vue"; import Amount from "./Amount.vue";
import AmountCIPS from "./AmountCIPS.vue";
import HiddenInput from "./HiddenInput.vue"; import HiddenInput from "./HiddenInput.vue";
import MandatoryNode from "./MandatoryNode.vue"; import MandatoryNode from "./MandatoryNode.vue";
import OptionalNode from "./OptionalNode.vue"; import OptionalNode from "./OptionalNode.vue";
...@@ -22,6 +23,7 @@ export default { ...@@ -22,6 +23,7 @@ export default {
"iso-date": Date, "iso-date": Date,
"iso-list": List, "iso-list": List,
"iso-amount": Amount, "iso-amount": Amount,
"iso-amountCIPS": AmountCIPS,
"iso-hidden-input": HiddenInput, "iso-hidden-input": HiddenInput,
"node-mandatory": MandatoryNode, "node-mandatory": MandatoryNode,
"node-optional": OptionalNode, "node-optional": OptionalNode,
......
...@@ -75,6 +75,8 @@ export default { ...@@ -75,6 +75,8 @@ export default {
let icp = this.inputCbprPlus; let icp = this.inputCbprPlus;
for(let mess of this.messageTypeCodes){ for(let mess of this.messageTypeCodes){
if(icp != null || icp != undefined){ if(icp != null || icp != undefined){
console.log(mess.value.indexOf(icp));
console.log(mess.value);
if(mess.value.indexOf(icp) != -1) if(mess.value.indexOf(icp) != -1)
mess.isShow = true; mess.isShow = true;
else else
......
...@@ -13793,6 +13793,19 @@ const MsgCodes = { ...@@ -13793,6 +13793,19 @@ const MsgCodes = {
label: "PO Box" label: "PO Box"
}, },
], ],
CIPSmessageTypeCode:[
{
value: "cips.111.001.02",
label: "客户汇款报文",
label2: "客户汇款报文",
isShow: true,
},{
value: "cips.112.001.02",
label: "金融机构汇款报文",
label2: "金融机构汇款报文",
isShow: true,
},
],
messageTypeCode: [{ messageTypeCode: [{
value: "pacs.008.001.08", value: "pacs.008.001.08",
label: "FI To FI Customer Credit Transfer", label: "FI To FI Customer Credit Transfer",
...@@ -15469,6 +15482,90 @@ const MsgCodes = { ...@@ -15469,6 +15482,90 @@ const MsgCodes = {
label: "Urgent" label: "Urgent"
}, },
], ],
BizPhaseTypeCode: [{
value: "DAYT",
label: "日间"
},
{
value: "NITT",
label: "夜间"
},
],
IDTypeCode: [{
value: "01",
label: "第一代居民身份证"
},
{
value: "02",
label: "第二代居民身份证"
},{
value: "03",
label: "临时身份证"
},
{
value: "04",
label: "中国护照"
},{
value: "05",
label: "户口薄"
},
{
value: "06",
label: "村民委员会证明"
},{
value: "07",
label: "学生证"
},
{
value: "08",
label: "军官证"
},{
value: "09",
label: "离休干部荣誉证"
},
{
value: "10",
label: "军官退休证"
},{
value: "11",
label: "文职干部退休证"
},
{
value: "12",
label: "军事学员证"
},{
value: "13",
label: "武警证"
},
{
value: "14",
label: "士兵证"
},{
value: "15",
label: "港澳居民来往内地通行证"
},
{
value: "16",
label: "台湾居民来往大陆通行证"
},{
value: "17",
label: "外国人永久居留证"
},
{
value: "18",
label: "边民出入境通行证"
},{
value: "19",
label: "外国护照"
},
{
value: "20",
label: "其他"
},{
value: "21",
label: "港澳台居民居住证"
},
],
externalDocumentLineType1Code: [{ externalDocumentLineType1Code: [{
value: "ADPI", value: "ADPI",
label: "AdditionalProductIdentificationAssignedByTheManufacturer", label: "AdditionalProductIdentificationAssignedByTheManufacturer",
......
import { import {
amountValidator, amountValidator,
amountCIPSValidator,
numberValidator, numberValidator,
regExpValidator, regExpValidator,
emptyObjectValueValidator, emptyObjectValueValidator,
...@@ -86,6 +87,19 @@ export default function msgComRender(node) { ...@@ -86,6 +87,19 @@ export default function msgComRender(node) {
trigger: "blur", trigger: "blur",
}; };
break; break;
case "AmountCIPS":
const sca1 = partTwo === "" ? partTwo.split(",") : [];
renderObj.is = "iso-amountCIPS";
renderObj.props = { sca1 };
renderObj.contextValidator = {
validator: amountCIPSValidator(
data.status === "M" && !data.unable && !data.disabled,
data.name,
sca1
),
trigger: "blur",
};
break;
case "HiddenInput": case "HiddenInput":
renderObj.is = "iso-hidden-input"; renderObj.is = "iso-hidden-input";
break; break;
......
...@@ -17,6 +17,8 @@ import Head_010_001_03 from "./Head_010_001_03"; ...@@ -17,6 +17,8 @@ import Head_010_001_03 from "./Head_010_001_03";
// import Head_057_001_06 from "./Head_057_001_06"; // import Head_057_001_06 from "./Head_057_001_06";
// import Head_060_001_05 from "./Head_060_001_05"; // import Head_060_001_05 from "./Head_060_001_05";
import Pacs_008_001_08 from "./Pacs_008_001_08"; import Pacs_008_001_08 from "./Pacs_008_001_08";
import cips_111_001_02 from "./cips_111_001_02";
import cips_112_001_02 from "./cips_112_001_02";
import Camt_053_001_08 from "./Camt_053_001_08"; import Camt_053_001_08 from "./Camt_053_001_08";
import Camt_054_001_08 from "./Camt_054_001_08"; import Camt_054_001_08 from "./Camt_054_001_08";
import Camt_056_001_08 from "./Camt_056_001_08"; import Camt_056_001_08 from "./Camt_056_001_08";
...@@ -132,6 +134,10 @@ export default function MsgJsonMap(mty) { ...@@ -132,6 +134,10 @@ export default function MsgJsonMap(mty) {
// return msgClone(Head_060_001_05); // return msgClone(Head_060_001_05);
case "pacs.008.001.08": case "pacs.008.001.08":
return msgClone(Pacs_008_001_08); return msgClone(Pacs_008_001_08);
case "cips.111.001.02":
return msgClone(cips_111_001_02);
case "cips.112.001.02":
return msgClone(cips_112_001_02);
case "camt.053.001.08": case "camt.053.001.08":
return msgClone(Camt_053_001_08); return msgClone(Camt_053_001_08);
case "Amount": case "Amount":
......
...@@ -86,6 +86,10 @@ export default function MsgJsonMap(mty) { ...@@ -86,6 +86,10 @@ export default function MsgJsonMap(mty) {
return msgClone(Camt_029_001_09); return msgClone(Camt_029_001_09);
case "pacs.008.001.08": case "pacs.008.001.08":
return msgClone(Pacs_008_001_08); return msgClone(Pacs_008_001_08);
case "cips.111.001.02":
return msgClone(cips_111_001_02);
case "cips.112.001.02":
return msgClone(cips_112_001_02);
case "admi.002.001.01": case "admi.002.001.01":
return msgClone(Admi_002_001_01); return msgClone(Admi_002_001_01);
case "pacs.002.001.10": case "pacs.002.001.10":
......
...@@ -41,6 +41,47 @@ export function amountValidator(isM, desc, sca) { ...@@ -41,6 +41,47 @@ export function amountValidator(isM, desc, sca) {
}; };
} }
export function amountCIPSValidator(isM, desc, sca) {
return (rule, value, callback) => {
const amtValue = value.amount + "";
const amtCcy = value.ccy;
if (amtValue === undefined || amtValue === null || amtValue.trim() === "") {
if (isM) {
callback(new Error(desc + " Cannot be null"));
} else if(amtCcy != ''){
callback(new Error("Amount Cannot be null"));
}else{
callback();
}
} else if (sca.length === 2) {
const totalDig = sca[0];
const fractionDig = sca[1];
if (amtValue.indexOf(".") == -1) {
//不包含小数点
if (amtValue.length <= totalDig) {
callback();
} else {
callback(new Error("The total number of digits cannot exceed" + totalDig));
}
} else {
//包含小数点
let valueArray = amtValue.split(".");
let integerNumber = valueArray[0].length;
let decimalNumber = valueArray[1].length;
if (decimalNumber > fractionDig) {
callback(new Error("The decimal place cannot exceed" + fractionDig));
} else if (integerNumber + decimalNumber > totalDig) {
callback(new Error("The total number of digits cannot exceed" + totalDig));
} else {
callback();
}
}
} else {
callback();
}
};
}
export function numberValidator(totalDig, fractionDig) { export function numberValidator(totalDig, fractionDig) {
return (rule, value, callback) => { return (rule, value, callback) => {
value = value + ""; value = value + "";
......
...@@ -2,9 +2,11 @@ import VueRouter from "vue-router"; ...@@ -2,9 +2,11 @@ import VueRouter from "vue-router";
import ISO from "../iso/pages/index.vue"; import ISO from "../iso/pages/index.vue";
import ISO2 from "../iso/pages/indexrtgs.vue"; import ISO2 from "../iso/pages/indexrtgs.vue";
import index from "../iso/index.vue"; import index from "../iso/index.vue";
import indexcips from "../iso/indexcips.vue";
import success from "../iso/pages/success.vue"; import success from "../iso/pages/success.vue";
import MX2MT from "../iso/pages/mx2mt.vue"; import MX2MT from "../iso/pages/mx2mt.vue";
import MT2MX from "../iso/pages/mt2mx.vue"; import MT2MX from "../iso/pages/mt2mx.vue";
import CIPS from "../iso/pages/indexcips.vue"
export default new VueRouter({ export default new VueRouter({
routes: [ routes: [
...@@ -14,6 +16,16 @@ export default new VueRouter({ ...@@ -14,6 +16,16 @@ export default new VueRouter({
props: true, props: true,
}, },
{ {
path: "/cips/:mty/:loginUser",
component: CIPS,
props: true,
},
{
path: "/cips",
component: indexcips,
props: true,
},
{
path: "/rtgs/:mty/:loginUser", path: "/rtgs/:mty/:loginUser",
component: ISO2, component: ISO2,
props: true, props: true,
......
package com.brilliance.mxeditor;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.brilliance.cips.framework.Result;
import com.brilliance.cips.utils.MsgUtil;
import com.brilliance.mxeditor.exception.SwiftException;
import com.brilliance.mxeditor.util.MessageUtil;
import com.brilliance.mxeditor.util.StringUtil;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
public class CipsTransfer {
private final static Logger logger = LoggerFactory.getLogger(CipsTransfer.class);
public static String transfer(String gsonStr) {
Map<String, Object> gsonMaps = JSON.parseObject(gsonStr);
Date date = new Date();
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat dateFormat2 = new SimpleDateFormat("HHmmss");
//改造map层级,使能转换成xml报文
//删除最外层FIToFICstmrCdtTrf
if (gsonMaps.get("FIToFICstmrCdtTrf") != null) {
JSONObject jsonObject = (JSONObject) gsonMaps.get("FIToFICstmrCdtTrf");
for (String key : jsonObject.keySet()) {
gsonMaps.put(key, jsonObject.get(key));
}
}
gsonMaps.remove("FIToFICstmrCdtTrf");
//新增OrigSendDate
String currentDate = dateFormat1.format(date);
gsonMaps.put("OrigSendDate",currentDate);
//新增OrigSendTime
String currentTime = dateFormat2.format(date);
gsonMaps.put("OrigSendTime",currentTime);
//新增OrigReceiver
List<String> listOrigReceiver = new ArrayList<>(Arrays.asList("CdtTrfTxInf","InstdAgt","FinInstnId","ClrSysMmbId"));
Map resOrigReceiver = gsonMaps;
for(String s: listOrigReceiver) {
if (resOrigReceiver.get(s) != null)
resOrigReceiver = (Map) resOrigReceiver.get(s);
}
if (resOrigReceiver.get("MmbId") != null)
gsonMaps.put("OrigReceiver",resOrigReceiver.get("MmbId"));
//新增OrigSender
List<String> listOrigSender = new ArrayList<>(Arrays.asList("CdtTrfTxInf","InstgAgt","FinInstnId","ClrSysMmbId"));
Map resOrigSender = gsonMaps;
for(String s: listOrigSender) {
if (resOrigSender.get(s) != null)
resOrigSender = (Map) resOrigSender.get(s);
}
if (resOrigSender.get("MmbId") != null)
gsonMaps.put("OrigSender",resOrigSender.get("MmbId"));
//新增cipsEndToEndId
List<String> listcipsEndToEndId = new ArrayList<>(Arrays.asList( "CdtTrfTxInf","PmtId"));
Map rescipsEndToEndId = gsonMaps;
for(String s: listcipsEndToEndId) {
if (rescipsEndToEndId.get(s) != null)
rescipsEndToEndId = (Map) rescipsEndToEndId.get(s);
}
if (rescipsEndToEndId.get("EndToEndId") != null)
gsonMaps.put("cipsEndToEndId",rescipsEndToEndId.get("EndToEndId"));
//新增MesgRefID
List<String> list = new ArrayList<>(Arrays.asList("GrpHdr"));
Map res = gsonMaps;
for(String s: list) {
if (res.get(s) != null)
res = (Map) res.get(s);
}
if (res.get("MsgId") != null)
gsonMaps.put("MesgRefID",res.get("MsgId"));
//新增MesgID、cipsMsgId、OrigSenderSID、OrigReceiverSID
gsonMaps.put("MesgID",gsonMaps.get("MesgRefID"));
gsonMaps.put("cipsMsgId",gsonMaps.get("MesgRefID"));
gsonMaps.put("OrigSenderSID","CIPS");
gsonMaps.put("OrigReceiverSID","CIPS");
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
System.out.println("CIPSGsonStr------>:::" + swiftGsonStr);
Result result = MsgUtil.packMessage(swiftGsonStr,"UTF-8");
return result.getMessage();
}
//解析key的值,循环遍历,将value放进maps里面
public static void putValue(Map<String, Object> maps, String key, Object value){
String[] keys = key.split("\\.");
for (int i=0; i<keys.length; i++) {
String tmpKey = keys[i];
if (i == (keys.length-1)) {
maps.put(tmpKey, value);
} else {
boolean jsonArrayFlag = false;
if (tmpKey.endsWith("*")) { //表示此节点是JSONARRAY,
tmpKey = tmpKey.substring(0, tmpKey.indexOf("*"));
jsonArrayFlag = true;
}
Object obj = maps.get(tmpKey);
if (obj == null) { //如果目标maps没有值,则新建一个新的map,再循环遍历
if (jsonArrayFlag) {
JSONArray jsonArray = new JSONArray();
maps.put(tmpKey, jsonArray);
maps = new HashMap<>();
jsonArray.add(maps);
} else {
Map<String, Object> tmpMaps = new HashMap<>();
maps.put(tmpKey, tmpMaps);
maps = tmpMaps;
}
} else {
if (jsonArrayFlag) {
JSONArray jsonArray = (JSONArray)obj;
maps = (Map<String, Object>)jsonArray.get(0);
} else {
maps = (Map<String, Object>)obj;
}
}
}
}
}
public static Map<String, Object> transfer2(String gsonStr, String identifier, String tp) {
Map<String, Object> gsonMaps = JSON.parseObject(gsonStr);
InputStream resourceAsStream = null;
InputStream resourceAsStream2 = null;
if ("rtgs".equals(tp)) {
resourceAsStream = MessageUtil.class.getResourceAsStream("/templateOut/" + identifier + "_rtgs.properties");
resourceAsStream2 = MessageUtil.class.getResourceAsStream("/templateOut/head00100102_rtgs.properties");
} else {
resourceAsStream = MessageUtil.class.getResourceAsStream("/templateOut/" + identifier + ".properties");
}
if (resourceAsStream == null) {
throw new SwiftException("没找到对应的配置文件" + identifier);
}
List<String> properties = StringUtil.inputStreamToLines(resourceAsStream);
if (resourceAsStream2 != null) {
List<String> properties2 = StringUtil.inputStreamToLines(resourceAsStream2);
properties.addAll(properties2);
}
Map<String, Object> maps = new HashMap<>();
for (String property : properties) {
if (property.startsWith("#")) {
continue;//过滤注释
}
String[] strArr = property.split("=");
if (strArr.length != 2) {
continue;//过滤掉不符合规则的配置
}
String key = strArr[0].trim();
String path = strArr[1].trim();
if (path.indexOf("@") > -1) {
path = path.substring(0, path.indexOf("@"));
}
putValue2(gsonMaps, key, path, maps, tp);
}
return maps;
}
public static Map<String, Object> putValue2(Map<String, Object> gsonMaps, String key, String path, Map<String, Object> maps, String tp) {
String[] keys = key.split("\\.");
Map<String, Object> tmpMaps = null;
tmpMaps = gsonMaps;
Map<String, Object> appHdr = null;
for (int i = 0; i < keys.length; i++) {
String tmpKey = keys[i];
if (i == (keys.length - 1)) {
if (key.contains("appHdr")) {
if (!Objects.isNull(maps.get("appHdr"))) {
appHdr = (Map<String, Object>) maps.get("appHdr");
} else {
appHdr = new HashMap<>();
}
appHdr.put(path, tmpMaps.get(tmpKey));
maps.put("appHdr", appHdr);
} else {
maps.put(path, tmpMaps.get(tmpKey));
}
} else {
if (tmpKey.endsWith("*")) { //表示此节点是JSONARRAY,
tmpKey = tmpKey.substring(0, tmpKey.indexOf("*"));
}
if (tmpMaps.get(tmpKey) instanceof JSONArray) {
tmpMaps = (JSONObject) ((JSONArray) tmpMaps.get(tmpKey)).get(0);
} else if (tmpMaps.get(tmpKey) instanceof JSONObject) {
tmpMaps = (JSONObject) tmpMaps.get(tmpKey);
} else {
if (!Objects.isNull(tmpMaps.get(tmpKey))) {
maps.put(path, tmpMaps.get(tmpKey));
}
}
}
}
return maps;
}
public static void main(String[] args) throws IOException {
File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\pacs00800108.json");
// File file = new File("d:/test/tst.json");
String gsonStr = FileUtils.readFileToString(file, "UTF-8");
String xml = transfer(gsonStr);
System.out.println(xml);
}
}
package com.brilliance.mxeditor.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.brilliance.mxeditor.MxTransfer;
import com.brilliance.mxeditor.config.EditorEnvConfig;
import com.brilliance.mxeditor.exception.SwiftException;
import com.brilliance.mxeditor.interf.CommonSend;
import com.brilliance.mxeditor.util.StringUtil;
import com.brilliance.mxeditor.util.SwiftTransferUtil;
import com.brilliance.mxeditor.vo.AccountVo;
import com.brilliance.mxeditor.vo.CipsVo;
import com.brilliance.mxeditor.vo.SwiftVo;
import com.brilliance.swift.SwiftTransfer;
import com.brilliance.swift.constants.Mx2MtConstants;
import com.brilliance.swift.vo.SwiftTranslationErrorInfo;
import com.brilliance.swift.vo.SwiftTranslationReport;
import com.prowidesoftware.swift.model.MxId;
import com.prowidesoftware.swift.model.mx.AbstractMX;
import com.prowidesoftware.swift.model.mx.NamespaceReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import static com.brilliance.mxeditor.CipsTransfer.transfer;
@Controller
@CrossOrigin
@RequestMapping("/cips")
public class CipsEditorController {
private final static Logger logger = LoggerFactory.getLogger(CipsEditorController.class);
@Autowired
private EditorEnvConfig editorEnvConfig;
@RequestMapping(value = "/msgsend", method = RequestMethod.POST)
@ResponseBody
public String msgPreview(@RequestBody SwiftVo swiftVo) {
String xml = null;
if(StringUtil.isNotEmpty(swiftVo.getJson())){
xml = transfer(swiftVo.getJson());
}
return xml;
}
@RequestMapping(value = "/msgsave", method = RequestMethod.POST)
@ResponseBody
public String msgSave(@RequestBody CipsVo cipsVo) {
String opeType = cipsVo.getOpeType();
String loginUser = cipsVo.getLoginUser();
Map<String, Object> gsonMaps = JSON.parseObject(cipsVo.getJson());
String identifier = (String) gsonMaps.get("MesgType");
identifier = identifier.replace(".", "");
try {
String xml = transfer(cipsVo.getJson());
Map<String, Object> map = new HashMap();
map.put("interface", "cipsEdit");
map.put("transaction", "save");
map.put("xmlmsg", xml);
map.put("user", loginUser);
// 1-新增报文 2-更新报文
map.put("opeType", StringUtil.isNotEmpty(opeType) ? opeType : "1");
Map res = (Map) CommonSend.send(map);
String retcod = (String) res.get("retcode");
if (retcod != null && retcod.endsWith("0000000")) {
return "1" + identifier + ".xml is saved successfully";
} else {
return "savsf2 return:" + retcod;
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
return "0";
}
}
@RequestMapping(value = "/msgvalidate", method = RequestMethod.POST)
@ResponseBody
public String msgValidate(@RequestBody SwiftVo swiftVo) {
try {
String xml = swiftVo.getXml();
boolean b= validateCips(xml);
if(b){
return "1";
}else {
return "0";
}
}catch (SwiftException e){
return e.getMessage();
}
}
@RequestMapping(value = "/mxType", method = RequestMethod.POST)
@ResponseBody
public String mxType(@RequestBody SwiftVo swiftVo){
Optional<String> namespace = NamespaceReader.findDocumentNamespace(swiftVo.getXml());
if (namespace.isPresent()) {
MxId documentMxId = new MxId(namespace.get());
String documentName = documentMxId.getBusinessProcess().name()
+ documentMxId.getFunctionality()
+ documentMxId.getVariant();
if("pacs009001".equals(documentName)){
return "true";
}
}
return null;
}
@RequestMapping(value = "/mx2mt", method = RequestMethod.POST)
@ResponseBody
public String mx2Mt(@RequestBody SwiftVo swiftVo){
Map<String, Object> maps = new HashMap<String, Object>();
try {
if("MT202".equals(swiftVo.getMtType())||"MT205".equals(swiftVo.getMtType())){
maps.put("MtType",swiftVo.getMtType());
}
SwiftTranslationReport str = SwiftTransfer.mx2MtPlus(swiftVo.getXml(), null, maps);
String mstr = str.getMessage();
List<SwiftTranslationErrorInfo> errorInfos = str.getErrorInfos();
if (StringUtil.isEmpty(mstr)) {
return null;
}
String errorDsp = "Translation Result : " + str.getTranslationResult();
if (errorInfos != null && errorInfos.size() > 0) {
for (int i = 0; i < errorInfos.size(); i++) {
SwiftTranslationErrorInfo errorInfo = errorInfos.get(i);
errorDsp += Mx2MtConstants.NEW_LINE + errorInfo.toString();
}
}
return errorDsp +Mx2MtConstants.NEW_LINE+ mstr;
} catch (com.brilliance.swift.exception.SwiftException e){
return e.getMessage();
} catch (Exception e){
return "报文格式有问题,请重新输入!!!";
}
}
@RequestMapping(value = "/mt2mx", method = RequestMethod.POST)
@ResponseBody
public String mt2Mx(@RequestBody Map<String, String> mtMsgMap) {
try {
SwiftTranslationReport report = SwiftTransfer.mt2MxPlus(mtMsgMap.get("mtMsg"), null, null);
String errorDsp = "";
List<SwiftTranslationErrorInfo> errorInfos = report.getErrorInfos();
if (errorInfos != null && errorInfos.size() > 0) {
for (SwiftTranslationErrorInfo errorInfo : errorInfos) {
errorDsp += errorInfo.getErrorType()
+ "-" + errorInfo.getErrorCode()
+ ":" + errorInfo.getDescription();
if (com.brilliance.swift.util.StringUtil.isNotEmpty(errorInfo.getLocation())) {
errorDsp += ";Occur in the " + errorInfo.getLocation();
}
if (com.brilliance.swift.util.StringUtil.isNotEmpty(errorInfo.getOriginalValue())) {
errorDsp += ";Original Value is " + errorInfo.getOriginalValue();
}
errorDsp += Mx2MtConstants.NEW_LINE;
}
}
if (com.brilliance.swift.util.StringUtil.isNotEmpty(errorDsp)) {
errorDsp += Mx2MtConstants.NEW_LINE;
}
return errorDsp+report.getMessage();
} catch (com.brilliance.swift.exception.SwiftException e) {
return e.getMessage();
}
}
@RequestMapping(value = "/mx2Json", method = RequestMethod.POST)
@ResponseBody
public JSONObject mx2Json(@RequestBody SwiftVo swiftVo) {
logger.info("---->swiftVo.getMty():" + swiftVo.getMty());
if (swiftVo.getMty() != null) {
String messageType = swiftVo.getMty().replaceAll("\\.", "");
// 根据smhinr获取报文内容
String smhinr = swiftVo.getSmhinr();
logger.info("---->messageType:" + messageType);
logger.info("---->smhinr:" + smhinr);
Map<String, Object> map = new HashMap();
// 接口
map.put("interface", "bdTaskFive");
// 交易
map.put("transaction", "getMsg");
// 根据报文id获取报文内容
map.put("smhinr", smhinr);
Map res = (Map) CommonSend.send(map);
String retcod = (String) res.get("retcode");
String xmlStr = "";
if (retcod != null && retcod.endsWith("0000000")) {
xmlStr = (String) res.get("xml");
}
// 本地测试打开下面注释代码
// if (StringUtil.isEmpty(xmlStr)) {
// File file = FileUtils.toFile(MxEditorController.class.getResource("/xml/" + swiftVo.getType() + "/" + messageType + ".xml"));
// try {
// xmlStr = FileUtils.readFileToString(file, "UTF-8");
// } catch (IOException e) {
// }
// }
if (swiftVo.getType() != null) {
AbstractMX abstractMX = AbstractMX.parse(xmlStr);
String s = abstractMX.toJson();
Map<String, Object> maps = MxTransfer.transfer2(s, messageType, swiftVo.getType());
JSONObject json = new JSONObject(maps);
return json;
}
}
return null;
}
public static boolean validateCips(String xml) {
try {
boolean b2 = false;
//1、只检验xml部分
String[] parts = xml.split("\\}");
String result = parts[parts.length - 1];
int endIndex = result.indexOf("\n");
result = result.substring(endIndex + 1);
String regex = "(\\<Document[\\w\\W]*\\<\\/Document\\>)";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(xml);
String documentXml = "";
if (m.find()) {
documentXml = m.group(1);
}
String documentXsdName = "";
Optional<String> namespace = NamespaceReader.findDocumentNamespace(result);
if (namespace.isPresent()) {
MxId documentMxId = new MxId(namespace.get());
documentXsdName = documentMxId.getBusinessProcess().name()
+ documentMxId.getFunctionality()
+ documentMxId.getVariant()
+ documentMxId.getVersion();
}
if (StringUtil.isNotEmpty(documentXsdName) && StringUtil.isNotEmpty(documentXml)) {
SwiftTransferUtil.schemaValidate(documentXsdName, documentXml);
b2=true;
}
if(b2){
return true;
}else {
return false;
}
}catch (SwiftException e){
throw new SwiftException(e.getMessage());
}
}
@RequestMapping(value = "/saveTemplate", method = RequestMethod.POST)
@ResponseBody
public String saveTemplate(@RequestBody SwiftVo swiftVo) {
Map<String, Object> gsonMaps = JSON.parseObject(swiftVo.getJson());
String type = (String) gsonMaps.get("type");
logger.info("---->swiftVo.type:" +type);
Map<String, Object> map = new HashMap();
map.put("interface", "bdTaskFive");
map.put("transaction", "savmxm");
map.put("user", swiftVo.getLoginUser());
map.put("nam", swiftVo.getName());
map.put("desp", swiftVo.getText());
if ("rtgs".equals(type)) {
map.put("mty", "RTGS." + swiftVo.getMty());
} else {
map.put("mty", "CBPR." + swiftVo.getMty());
}
map.put("sf2temp", swiftVo.getJson());
Map rs = (Map) CommonSend.send(map);
String retcod = (String) rs.get("retcode");
if (retcod != null && retcod.endsWith("0000000")) {
return "ok";
}
return null;
}
@RequestMapping(value = "/getTemplate", method = RequestMethod.POST)
@ResponseBody
public JSONObject getTemplate(@RequestBody SwiftVo swiftVo) {
logger.info("---->swiftVo.getMty():" + swiftVo.getMty());
if (swiftVo.getMty() != null) {
String messageType = swiftVo.getMty().replaceAll("\\.", "");
// 根据mxminr获取报文内容
String mxminr = swiftVo.getMxminr();
logger.info("---->messageType:" + messageType);
logger.info("---->mxminr:" + mxminr);
Map<String, Object> map = new HashMap();
// 接口
map.put("interface", "bdTaskFive");
// 交易
map.put("transaction", "getmxm");
// 根据报文id获取报文内容
map.put("inr", mxminr);
Map res = (Map) CommonSend.send(map);
if (res.containsKey("data")) {
Map<String, Object> data = (Map<String, Object>) res.get("data");
String txt = (String) data.get("txt");
Map<String, Object> resMap = JSON.parseObject(txt);
JSONObject json = new JSONObject(resMap);
logger.info(String.valueOf(json));
return json;
}
}
return null;
}
@RequestMapping(value = "/getBic", method = RequestMethod.POST)
@ResponseBody
public String getBic(@RequestBody AccountVo account) {
logger.info("---->查询信息为:" + account.toString());
Map<String, Object> map = new HashMap();
map.put("interface", "bdTaskFive");
map.put("transaction", "getbic");
map.put("biccod", account.getBiccod());
map.put("bicnam", account.getBicnam());
Map rs = (Map) CommonSend.send(map);
String retcod = (String) rs.get("retcode");
if (retcod != null && retcod.endsWith("0000000")) {
return (String) rs.get("data");
}else
return null;
}
}
package com.brilliance.mxeditor.vo;
/**
* @author zh
* @create 2022-07-29 16:00
*/
public class CipsVo {
private String json;
private String xml;
private String mtType;
private String mty;
private String smhinr;
private String type;
// 1-新增报文 2-更新报文
private String opeType;
private String loginUser;
//模板名称
private String name;
//备注
private String text;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getMxminr() {
return mxminr;
}
public void setMxminr(String mxminr) {
this.mxminr = mxminr;
}
//模板inr
private String mxminr;
public String getLoginUser() {
return loginUser;
}
public void setLoginUser(String loginUser) {
this.loginUser = loginUser;
}
public String getXml() {
return xml;
}
public String getOpeType() {
return opeType;
}
public void setOpeType(String opeType) {
this.opeType = opeType;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
public String getMtType() {
return mtType;
}
public String getMty() {
return mty;
}
public void setMty(String mty) {
this.mty = mty;
}
public String getSmhinr() {
return smhinr;
}
public void setSmhinr(String smhinr) {
this.smhinr = smhinr;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Standards Editor (build:R1.6.5.6) on 2016 Feb 12 17:27:39, ISO 20022 version : 2013-->
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.06" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pacs.008.001.06">
<xs:element name="Document" type="Document"/>
<xs:complexType name="AccountIdentification4Choice">
<xs:choice>
<xs:element name="IBAN" type="IBAN2007Identifier"/>
<xs:element name="Othr" type="GenericAccountIdentification1"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="AccountSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="ActiveCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AddressType2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="ADDR"/>
<xs:enumeration value="PBOX"/>
<xs:enumeration value="HOME"/>
<xs:enumeration value="BIZZ"/>
<xs:enumeration value="MLTO"/>
<xs:enumeration value="DLVY"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AnyBICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BICFIIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BaseOneRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BatchBookingIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
<xs:complexType name="BranchAndFinancialInstitutionIdentification5">
<xs:sequence>
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BranchData2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccount24">
<xs:sequence>
<xs:element name="Id" type="AccountIdentification4Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccountType2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCashAccountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="CategoryPurpose1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="ChargeBearerType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DEBT"/>
<xs:enumeration value="CRED"/>
<xs:enumeration value="SHAR"/>
<xs:enumeration value="SLEV"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Charges2">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element name="Agt" type="BranchAndFinancialInstitutionIdentification5"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ClearingChannel2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RTGS"/>
<xs:enumeration value="RTNS"/>
<xs:enumeration value="MPNS"/>
<xs:enumeration value="BOOK"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ClearingSystemIdentification3Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCashClearingSystem1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ClearingSystemMemberIdentification2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
<xs:element name="MmbId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactDetails2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CountryCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CreditDebitCode">
<xs:restriction base="xs:string">
<xs:enumeration value="CRDT"/>
<xs:enumeration value="DBIT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CreditTransferTransaction25">
<xs:sequence>
<xs:element name="PmtId" type="PaymentIdentification3"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation21"/>
<xs:element name="IntrBkSttlmAmt" type="ActiveCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrBkSttlmDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmPrty" type="Priority3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmTmIndctn" type="SettlementDateTimeIndication1"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmTmReq" type="SettlementTimeRequest2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AccptncDtTm" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
<xs:element name="ChrgBr" type="ChargeBearerType1Code"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ChrgsInf" type="Charges2"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="InitgPty" type="PartyIdentification43"/>
<xs:element name="Dbtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAcct" type="CashAccount24"/>
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
<xs:element name="Cdtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForNxtAgt" type="InstructionForNextAgent1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation4"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation11"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceInformation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType1Choice">
<xs:choice>
<xs:element name="Cd" type="DocumentType3Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="CreditorReferenceType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DateAndPlaceOfBirth">
<xs:sequence>
<xs:element name="BirthDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
<xs:element name="CityOfBirth" type="Max35Text"/>
<xs:element name="CtryOfBirth" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DatePeriodDetails">
<xs:sequence>
<xs:element name="FrDt" type="ISODate"/>
<xs:element name="ToDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DecimalNumber">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="17"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DiscountAmountAndType1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DiscountAmountType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Document">
<xs:sequence>
<xs:element name="FIToFICstmrCdtTrf" type="FIToFICustomerCreditTransferV06"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentAdjustment1">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineIdentification1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DocumentLineType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineInformation1">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="Id" type="DocumentLineIdentification1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Desc" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="RemittanceAmount3"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineType1">
<xs:sequence>
<xs:element name="CdOrPrtry" type="DocumentLineType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalDocumentLineType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="DocumentType3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RADM"/>
<xs:enumeration value="RPIN"/>
<xs:enumeration value="FXDR"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="PUOR"/>
<xs:enumeration value="SCOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DocumentType6Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MSIN"/>
<xs:enumeration value="CNFA"/>
<xs:enumeration value="DNFA"/>
<xs:enumeration value="CINV"/>
<xs:enumeration value="CREN"/>
<xs:enumeration value="DEBN"/>
<xs:enumeration value="HIRI"/>
<xs:enumeration value="SBIN"/>
<xs:enumeration value="CMCN"/>
<xs:enumeration value="SOAC"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="BOLD"/>
<xs:enumeration value="VCHR"/>
<xs:enumeration value="AROI"/>
<xs:enumeration value="TSUT"/>
<xs:enumeration value="PUOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalAccountIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCashAccountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCashClearingSystem1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCategoryPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalDiscountAmountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalDocumentLineType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalGarnishmentType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalLocalInstrument1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalOrganisationIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPersonIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalServiceLevel1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalTaxAmountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FIToFICustomerCreditTransferV06">
<xs:sequence>
<xs:element name="GrpHdr" type="GroupHeader70"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction25"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="FinancialInstitutionIdentification8">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Garnishment1">
<xs:sequence>
<xs:element name="Tp" type="GarnishmentType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Grnshee" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtAdmstr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="FmlyMdclInsrncInd" type="TrueFalseIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="MplyeeTermntnInd" type="TrueFalseIndicator"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GarnishmentType1">
<xs:sequence>
<xs:element name="CdOrPrtry" type="GarnishmentType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GarnishmentType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalGarnishmentType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="GenericAccountIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max34Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericFinancialIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericOrganisationIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericPersonIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GroupHeader70">
<xs:sequence>
<xs:element name="MsgId" type="Max35Text"/>
<xs:element name="CreDtTm" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
<xs:element name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlIntrBkSttlmAmt" type="ActiveCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrBkSttlmDt" type="ISODate"/>
<xs:element name="SttlmInf" type="SettlementInstruction4"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation21"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAgt" type="BranchAndFinancialInstitutionIdentification5"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="IBAN2007Identifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ISODate">
<xs:restriction base="xs:date"/>
</xs:simpleType>
<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:simpleType name="ISOTime">
<xs:restriction base="xs:time"/>
</xs:simpleType>
<xs:simpleType name="Instruction3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CHQB"/>
<xs:enumeration value="HOLD"/>
<xs:enumeration value="PHOB"/>
<xs:enumeration value="TELB"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Instruction4Code">
<xs:restriction base="xs:string">
<xs:enumeration value="PHOA"/>
<xs:enumeration value="TELA"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="InstructionForCreditorAgent1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InstructionForNextAgent1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction4Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LocalInstrument2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="Max10Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max140Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max15NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,15}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max2048Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="2048"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max34Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="34"/>
</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:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max4Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max70Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="NameAndAddress10">
<xs:sequence>
<xs:element name="Nm" type="Max140Text"/>
<xs:element name="Adr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="NamePrefix1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DOCT"/>
<xs:enumeration value="MIST"/>
<xs:enumeration value="MISS"/>
<xs:enumeration value="MADM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Number">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="0"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OrganisationIdentification8">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Party11Choice">
<xs:choice>
<xs:element name="OrgId" type="OrganisationIdentification8"/>
<xs:element name="PrvtId" type="PersonIdentification5"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="PartyIdentification43">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentIdentification3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
<xs:element name="EndToEndId" type="Max35Text"/>
<xs:element name="TxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysRef" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentTypeInformation21">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrChanl" type="ClearingChannel2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PercentageRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PersonIdentification5">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PersonIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="PhoneNumber">
<xs:restriction base="xs:string">
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PostalAddress6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Priority2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Priority3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="URGT"/>
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Purpose2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ReferredDocumentInformation7">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType4"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="LineDtls" type="DocumentLineInformation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType3Choice">
<xs:choice>
<xs:element name="Cd" type="DocumentType6Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ReferredDocumentType4">
<xs:sequence>
<xs:element name="CdOrPrtry" type="ReferredDocumentType3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryAuthority2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RegulatoryReportingType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CRED"/>
<xs:enumeration value="DEBT"/>
<xs:enumeration value="BOTH"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RemittanceAmount2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceAmount3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceInformation11">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation13"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceLocation4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RmtLctnDtls" type="RemittanceLocationDetails1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceLocationDetails1">
<xs:sequence>
<xs:element name="Mtd" type="RemittanceLocationMethod2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ElctrncAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="NameAndAddress10"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RemittanceLocationMethod2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="FAXI"/>
<xs:enumeration value="EDIC"/>
<xs:enumeration value="URID"/>
<xs:enumeration value="EMAL"/>
<xs:enumeration value="POST"/>
<xs:enumeration value="SMSM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ServiceLevel8Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="SettlementDateTimeIndication1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DbtDtTm" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDtTm" type="ISODateTime"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SettlementInstruction4">
<xs:sequence>
<xs:element name="SttlmMtd" type="SettlementMethod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSys" type="ClearingSystemIdentification3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgRmbrsmntAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdRmbrsmntAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="ThrdRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="ThrdRmbrsmntAgtAcct" type="CashAccount24"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="SettlementMethod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="INDA"/>
<xs:enumeration value="INGA"/>
<xs:enumeration value="COVE"/>
<xs:enumeration value="CLRG"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="SettlementTimeRequest2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="CLSTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="TillTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="RjctTm" type="ISOTime"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRemittanceInformation13">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation7"/>
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxRmt" type="TaxInformation4"/>
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtRmt" type="Garnishment1"/>
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SupplementaryData1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
<xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SupplementaryDataEnvelope1">
<xs:sequence>
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmountAndType1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmountType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="TaxAuthorisation1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZone" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxPeriod1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecord1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecordDetails1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TaxRecordPeriod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MM01"/>
<xs:enumeration value="MM02"/>
<xs:enumeration value="MM03"/>
<xs:enumeration value="MM04"/>
<xs:enumeration value="MM05"/>
<xs:enumeration value="MM06"/>
<xs:enumeration value="MM07"/>
<xs:enumeration value="MM08"/>
<xs:enumeration value="MM09"/>
<xs:enumeration value="MM10"/>
<xs:enumeration value="MM11"/>
<xs:enumeration value="MM12"/>
<xs:enumeration value="QTR1"/>
<xs:enumeration value="QTR2"/>
<xs:enumeration value="QTR3"/>
<xs:enumeration value="QTR4"/>
<xs:enumeration value="HLF1"/>
<xs:enumeration value="HLF2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TrueFalseIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Standards Editor (build:R1.6.5.6) on 2016 Feb 12 17:27:39, ISO 20022 version : 2013-->
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.06" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pacs.009.001.06">
<xs:element name="Document" type="Document"/>
<xs:complexType name="AccountIdentification4Choice">
<xs:choice>
<xs:element name="IBAN" type="IBAN2007Identifier"/>
<xs:element name="Othr" type="GenericAccountIdentification1"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="AccountSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="ActiveCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AddressType2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="ADDR"/>
<xs:enumeration value="PBOX"/>
<xs:enumeration value="HOME"/>
<xs:enumeration value="BIZZ"/>
<xs:enumeration value="MLTO"/>
<xs:enumeration value="DLVY"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AnyBICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BICFIIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BatchBookingIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
<xs:complexType name="BranchAndFinancialInstitutionIdentification5">
<xs:sequence>
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification8"/>
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BranchData2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccount24">
<xs:sequence>
<xs:element name="Id" type="AccountIdentification4Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccountType2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCashAccountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="CategoryPurpose1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="ClearingChannel2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RTGS"/>
<xs:enumeration value="RTNS"/>
<xs:enumeration value="MPNS"/>
<xs:enumeration value="BOOK"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ClearingSystemIdentification3Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalCashClearingSystem1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ClearingSystemMemberIdentification2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
<xs:element name="MmbId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactDetails2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CountryCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CreditDebitCode">
<xs:restriction base="xs:string">
<xs:enumeration value="CRDT"/>
<xs:enumeration value="DBIT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CreditTransferTransaction23">
<xs:sequence>
<xs:element name="PmtId" type="PaymentIdentification3"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation21"/>
<xs:element name="IntrBkSttlmAmt" type="ActiveCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrBkSttlmDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmPrty" type="Priority3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmTmIndctn" type="SettlementDateTimeIndication1"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmTmReq" type="SettlementTimeRequest2"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element name="Dbtr" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
<xs:element name="Cdtr" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent2"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForNxtAgt" type="InstructionForNextAgent1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="UndrlygCstmrCdtTrf" type="CreditTransferTransaction24"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditTransferTransaction24">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="InitgPty" type="PartyIdentification43"/>
<xs:element name="Dbtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAcct" type="CashAccount24"/>
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvsInstgAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount24"/>
<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount24"/>
<xs:element name="Cdtr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification43"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForNxtAgt" type="InstructionForNextAgent1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation11"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceInformation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType1Choice">
<xs:choice>
<xs:element name="Cd" type="DocumentType3Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="CreditorReferenceType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DateAndPlaceOfBirth">
<xs:sequence>
<xs:element name="BirthDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
<xs:element name="CityOfBirth" type="Max35Text"/>
<xs:element name="CtryOfBirth" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DatePeriodDetails">
<xs:sequence>
<xs:element name="FrDt" type="ISODate"/>
<xs:element name="ToDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DecimalNumber">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="17"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DiscountAmountAndType1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DiscountAmountType1Choice"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DiscountAmountType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalDiscountAmountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Document">
<xs:sequence>
<xs:element name="FICdtTrf" type="FinancialInstitutionCreditTransferV06"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentAdjustment1">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineIdentification1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="DocumentLineType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineInformation1">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="Id" type="DocumentLineIdentification1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Desc" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="RemittanceAmount3"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineType1">
<xs:sequence>
<xs:element name="CdOrPrtry" type="DocumentLineType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentLineType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalDocumentLineType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="DocumentType3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RADM"/>
<xs:enumeration value="RPIN"/>
<xs:enumeration value="FXDR"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="PUOR"/>
<xs:enumeration value="SCOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DocumentType6Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MSIN"/>
<xs:enumeration value="CNFA"/>
<xs:enumeration value="DNFA"/>
<xs:enumeration value="CINV"/>
<xs:enumeration value="CREN"/>
<xs:enumeration value="DEBN"/>
<xs:enumeration value="HIRI"/>
<xs:enumeration value="SBIN"/>
<xs:enumeration value="CMCN"/>
<xs:enumeration value="SOAC"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="BOLD"/>
<xs:enumeration value="VCHR"/>
<xs:enumeration value="AROI"/>
<xs:enumeration value="TSUT"/>
<xs:enumeration value="PUOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalAccountIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCashAccountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCashClearingSystem1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="3"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCategoryPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalDiscountAmountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalDocumentLineType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalGarnishmentType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalLocalInstrument1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalOrganisationIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPersonIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalServiceLevel1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalTaxAmountType1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="FinancialInstitutionCreditTransferV06">
<xs:sequence>
<xs:element name="GrpHdr" type="GroupHeader70"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransaction23"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="SplmtryData" type="SupplementaryData1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinancialInstitutionIdentification8">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BICFI" type="BICFIIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Garnishment1">
<xs:sequence>
<xs:element name="Tp" type="GarnishmentType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Grnshee" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtAdmstr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="FmlyMdclInsrncInd" type="TrueFalseIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="MplyeeTermntnInd" type="TrueFalseIndicator"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GarnishmentType1">
<xs:sequence>
<xs:element name="CdOrPrtry" type="GarnishmentType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GarnishmentType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalGarnishmentType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="GenericAccountIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max34Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericFinancialIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericOrganisationIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericPersonIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GroupHeader70">
<xs:sequence>
<xs:element name="MsgId" type="Max35Text"/>
<xs:element name="CreDtTm" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
<xs:element name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlIntrBkSttlmAmt" type="ActiveCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrBkSttlmDt" type="ISODate"/>
<xs:element name="SttlmInf" type="SettlementInstruction4"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation21"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdAgt" type="BranchAndFinancialInstitutionIdentification5"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="IBAN2007Identifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ISODate">
<xs:restriction base="xs:date"/>
</xs:simpleType>
<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:simpleType name="ISOTime">
<xs:restriction base="xs:time"/>
</xs:simpleType>
<xs:simpleType name="Instruction3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CHQB"/>
<xs:enumeration value="HOLD"/>
<xs:enumeration value="PHOB"/>
<xs:enumeration value="TELB"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Instruction4Code">
<xs:restriction base="xs:string">
<xs:enumeration value="PHOA"/>
<xs:enumeration value="TELA"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Instruction5Code">
<xs:restriction base="xs:string">
<xs:enumeration value="PHOB"/>
<xs:enumeration value="TELB"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="InstructionForCreditorAgent1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InstructionForCreditorAgent2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction5Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="InstructionForNextAgent1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction4Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LocalInstrument2Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="Max140Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max15NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,15}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max2048Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="2048"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max34Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="34"/>
</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:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max4Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max70Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NamePrefix1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DOCT"/>
<xs:enumeration value="MIST"/>
<xs:enumeration value="MISS"/>
<xs:enumeration value="MADM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Number">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="0"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OrganisationIdentification8">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AnyBIC" type="AnyBICIdentifier"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="Party11Choice">
<xs:choice>
<xs:element name="OrgId" type="OrganisationIdentification8"/>
<xs:element name="PrvtId" type="PersonIdentification5"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="PartyIdentification43">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party11Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentIdentification3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
<xs:element name="EndToEndId" type="Max35Text"/>
<xs:element name="TxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="UETR" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentTypeInformation21">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrChanl" type="ClearingChannel2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PercentageRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PersonIdentification5">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PersonIdentificationSchemeName1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="PhoneNumber">
<xs:restriction base="xs:string">
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PostalAddress6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Priority2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Priority3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="URGT"/>
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ReferredDocumentInformation7">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType4"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="LineDtls" type="DocumentLineInformation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType3Choice">
<xs:choice>
<xs:element name="Cd" type="DocumentType6Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="ReferredDocumentType4">
<xs:sequence>
<xs:element name="CdOrPrtry" type="ReferredDocumentType3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceAmount2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceAmount3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="DscntApldAmt" type="DiscountAmountAndType1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="TaxAmt" type="TaxAmountAndType1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceInformation11">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation13"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceInformation2">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ServiceLevel8Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="SettlementDateTimeIndication1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DbtDtTm" type="ISODateTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDtTm" type="ISODateTime"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SettlementInstruction4">
<xs:sequence>
<xs:element name="SttlmMtd" type="SettlementMethod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SttlmAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSys" type="ClearingSystemIdentification3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstgRmbrsmntAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstdRmbrsmntAgtAcct" type="CashAccount24"/>
<xs:element maxOccurs="1" minOccurs="0" name="ThrdRmbrsmntAgt" type="BranchAndFinancialInstitutionIdentification5"/>
<xs:element maxOccurs="1" minOccurs="0" name="ThrdRmbrsmntAgtAcct" type="CashAccount24"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="SettlementMethod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="INDA"/>
<xs:enumeration value="INGA"/>
<xs:enumeration value="COVE"/>
<xs:enumeration value="CLRG"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="SettlementTimeRequest2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="CLSTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="TillTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrTm" type="ISOTime"/>
<xs:element maxOccurs="1" minOccurs="0" name="RjctTm" type="ISOTime"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRemittanceInformation13">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation7"/>
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount2"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification43"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxRmt" type="TaxInformation4"/>
<xs:element maxOccurs="1" minOccurs="0" name="GrnshmtRmt" type="Garnishment1"/>
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SupplementaryData1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="PlcAndNm" type="Max350Text"/>
<xs:element name="Envlp" type="SupplementaryDataEnvelope1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="SupplementaryDataEnvelope1">
<xs:sequence>
<xs:any namespace="##any" processContents="lax"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmountAndType1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxAmountType1Choice"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmountType1Choice">
<xs:choice>
<xs:element name="Cd" type="ExternalTaxAmountType1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="TaxAuthorisation1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZone" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxPeriod1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecord1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecordDetails1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TaxRecordPeriod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MM01"/>
<xs:enumeration value="MM02"/>
<xs:enumeration value="MM03"/>
<xs:enumeration value="MM04"/>
<xs:enumeration value="MM05"/>
<xs:enumeration value="MM06"/>
<xs:enumeration value="MM07"/>
<xs:enumeration value="MM08"/>
<xs:enumeration value="MM09"/>
<xs:enumeration value="MM10"/>
<xs:enumeration value="MM11"/>
<xs:enumeration value="MM12"/>
<xs:enumeration value="QTR1"/>
<xs:enumeration value="QTR2"/>
<xs:enumeration value="QTR3"/>
<xs:enumeration value="QTR4"/>
<xs:enumeration value="HLF1"/>
<xs:enumeration value="HLF2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TrueFalseIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
</xs:schema>
package com.brilliance.mxeditor;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.brilliance.cips.framework.Result;
import com.brilliance.cips.packet.model.Msg;
import com.brilliance.cips.utils.MsgUtil;
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
public class TestCIPS {
private final static Logger logger = LoggerFactory.getLogger(MxTransfer.class);
@Test
public void testTrans() throws IOException {
// File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\111success.json");
File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\111.json");
String gsonStr = FileUtils.readFileToString(file, "UTF-8");
Map<String, Object> gsonMaps = JSON.parseObject(gsonStr);
Date date = new Date();
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat dateFormat2 = new SimpleDateFormat("HHmmss");
//改造map层级,使能转换成xml报文
//删除最外层FIToFICstmrCdtTrf
if (gsonMaps.get("FIToFICstmrCdtTrf") != null) {
JSONObject jsonObject = (JSONObject) gsonMaps.get("FIToFICstmrCdtTrf");
for (String key : jsonObject.keySet()) {
gsonMaps.put(key, jsonObject.get(key));
}
}
gsonMaps.remove("FIToFICstmrCdtTrf");
//新增OrigSendDate
String currentDate = dateFormat1.format(date);
gsonMaps.put("OrigSendDate",currentDate);
//新增OrigSendTime
String currentTime = dateFormat2.format(date);
gsonMaps.put("OrigSendTime",currentTime);
//新增OrigReceiver
List<String> listOrigReceiver = new ArrayList<>(Arrays.asList("CdtTrfTxInf","InstdAgt","FinInstnId","ClrSysMmbId"));
Map resOrigReceiver = gsonMaps;
for(String s: listOrigReceiver) {
if (resOrigReceiver.get(s) != null)
resOrigReceiver = (Map) resOrigReceiver.get(s);
}
if (resOrigReceiver.get("MmbId") != null)
gsonMaps.put("OrigReceiver",resOrigReceiver.get("MmbId"));
//新增OrigSender
List<String> listOrigSender = new ArrayList<>(Arrays.asList("CdtTrfTxInf","InstgAgt","FinInstnId","ClrSysMmbId"));
Map resOrigSender = gsonMaps;
for(String s: listOrigSender) {
if (resOrigSender.get(s) != null)
resOrigSender = (Map) resOrigSender.get(s);
}
if (resOrigSender.get("MmbId") != null)
gsonMaps.put("OrigSender",resOrigSender.get("MmbId"));
//新增cipsEndToEndId
List<String> listcipsEndToEndId = new ArrayList<>(Arrays.asList( "CdtTrfTxInf","PmtId"));
Map rescipsEndToEndId = gsonMaps;
for(String s: listcipsEndToEndId) {
if (rescipsEndToEndId.get(s) != null)
rescipsEndToEndId = (Map) rescipsEndToEndId.get(s);
}
if (rescipsEndToEndId.get("EndToEndId") != null)
gsonMaps.put("cipsEndToEndId",rescipsEndToEndId.get("EndToEndId"));
//新增MesgRefID
List<String> list = new ArrayList<>(Arrays.asList("GrpHdr"));
Map res = gsonMaps;
for(String s: list) {
if (res.get(s) != null)
res = (Map) res.get(s);
}
if (res.get("MsgId") != null)
gsonMaps.put("MesgRefID",res.get("MsgId"));
//新增MesgID、cipsMsgId、OrigSenderSID、OrigReceiverSID
gsonMaps.put("MesgID",gsonMaps.get("MesgRefID"));
gsonMaps.put("cipsMsgId",gsonMaps.get("MesgRefID"));
gsonMaps.put("OrigSenderSID","CIPS");
gsonMaps.put("OrigReceiverSID","CIPS");
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
System.out.println("CIPSGsonStr------>:::" + swiftGsonStr);
Result result = MsgUtil.packMessage(swiftGsonStr,"UTF-8");
System.out.println(result.getMessage());
}
@Test
public void testcipsToMap()throws IOException {
File file = new File(System.getProperty("user.dir")+"\\src\\main\\resources\\json\\cips.111.001.02.xml");
String gsonStr = FileUtils.readFileToString(file, "UTF-8");
Map<String, Object> gsonMaps = MsgUtil.cips2Map(file);
String swiftGsonStr = new JSONObject(gsonMaps).toJSONString();
System.out.println("CIPSGsonStr------>:::" + swiftGsonStr);
}
}
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