XML2MT
XML2MT transforms XML instances conforming to the schemas issued by SWIFT in SWIFT Standards Developer Kit (SDK) to SWIFT Message Type (MT) messages.
Configuration and Testing
Component Configuration
Figure 1: XML2MT Configuration
Attributes
For information about the below attributes, please refer to the respective sections in the MT2XML page.
- Error Handling Configuration
- Standard Release MT Year
- Message Schema File
Expert Properties
Enable the Expert Properties view to configure these properties.
Expert properties are meant for advanced users; use with caution.
Figure 2: Expert properties for XML2MT
Pre Processing XSL Configuration
Pre Processing XSL configuration can be used to transform request message before processing it. Click the ellipses button against the property to configure the properties.
Refer to the Pre/Post Processing XSL Configuration section under the Common Configurations page for details regarding Pre Processing XSL configuration and Post Processing XSL configuration (below).
Post Processing XSL Configuration
Post Processing XSL configuration can be used to transform the response message before sending it to the output port.
Process Message Based on Property
The property helps components to skip certain messages from processing.
Refer to the Process Message Based On a Property section under the Common Configurations page.
Threadpool Configuration
This property is used when there is a need to process messages in parallel within the component, still maintaining the sequence from the external perspective.
For information about Threadpool Configuration, please refer to the section in the MT2XML page.
Testing
Input and Output
Sample Input
A sample XML message is as below (please expand).
A sample XML instance of message type MT101 – Request for Transfer
<?xml version="1.0" encoding="UTF-8"?>
<FinMessage xmlns="urn:swift:xsd:mtmsg.2012"><!--line=0-->
<Block1>
<ApplicationIdentifier>F</ApplicationIdentifier>
<ServiceIdentifier>01</ServiceIdentifier>
<LogicalTerminalAddress>BNKACHZZBIC0</LogicalTerminalAddress>
<SessionNumber>0000</SessionNumber>
<SequenceNumber>000000</SequenceNumber>
</Block1><!--line=0-->
<Block2>
<InputIdentifier>I</InputIdentifier>
<MessageType>101</MessageType>
<DestinationAddress>BNKBBEBBXBIC</DestinationAddress>
<MessagePriority>U</MessagePriority>
<DeliveryMonitoring>3</DeliveryMonitoring>
<ObsolescencePeriod>005</ObsolescencePeriod>
</Block2><!--line=0-->
<Block3><!--line=0-->
<F113>XXXX</F113>
</Block3><!--line=0-->
<Block4>
<Document xmlns="urn:swift:xsd:fin.102.2012">
<MT102>
<SeqA>
<F20a><!--line=1-->
<F20>5362/MPB</F20>
</F20a>
<F23a><!--line=2-->
<F23>CREDIT</F23>
</F23a>
<F50a><!--line=3-->
<F50K>
<Account>1234567890</Account>
<NameAndAddress>
<Line>CONSORTIA PENSION SCHEME</Line>
<Line>FRIEDRICHSTRASSE, 27</Line>
<Line>8022-ZURICH</Line>
</NameAndAddress>
</F50K>
</F50a>
<F71a><!--line=7-->
<F71A>OUR</F71A>
</F71a>
<F36a><!--line=8-->
<F36>1,6</F36>
</F36a>
</SeqA>
<SeqB>
<F21a><!--line=9-->
<F21>ABC/123</F21>
</F21a>
<F32a><!--line=10-->
<F32B>
<Currency>EUR</Currency>
<Amount>1250,</Amount>
</F32B>
</F32a>
<F59a><!--line=11-->
<F59>
<Account>001161685134</Account>
<NameAndAddress>
<Line>JOHANN WILLEMS</Line>
<Line>RUE JOSEPH II, 19</Line>
<Line>1040 BRUSSELS</Line>
</NameAndAddress>
</F59>
</F59a>
<F70a><!--line=15-->
<F70>
<Narrative>
<Line>PENSION PAYMENT SEPTEMBER 2009</Line>
</Narrative>
</F70>
</F70a>
<F33a><!--line=16-->
<F33B>
<Currency>CHF</Currency>
<Amount>2000,</Amount>
</F33B>
</F33a>
<F71a_3><!--line=17-->
<F71G>
<Currency>EUR</Currency>
<Amount>5,</Amount>
</F71G>
</F71a_3>
</SeqB>
<SeqB>
<F21a><!--line=18-->
<F21>ABC/124</F21>
</F21a>
<F32a><!--line=19-->
<F32B>
<Currency>EUR</Currency>
<Amount>1875,</Amount>
</F32B>
</F32a>
<F59a><!--line=20-->
<F59>
<Account>510007547061</Account>
<NameAndAddress>
<Line>JOAN MILLS</Line>
<Line>AVENUE LOUISE 213</Line>
<Line>1050 BRUSSELS</Line>
</NameAndAddress>
</F59>
</F59a>
<F70a><!--line=24-->
<F70>
<Narrative>
<Line>PENSION PAYMENT SEPTEMBER 2003</Line>
</Narrative>
</F70>
</F70a>
<F33a><!--line=25-->
<F33B>
<Currency>CHF</Currency>
<Amount>3000,</Amount>
</F33B>
</F33a>
<F71a_3><!--line=26-->
<F71G>
<Currency>EUR</Currency>
<Amount>5,</Amount>
</F71G>
</F71a_3>
</SeqB>
<SeqC>
<F32a><!--line=27-->
<F32A>
<Date>090828</Date>
<Currency>EUR</Currency>
<Amount>3135,</Amount>
</F32A>
</F32a>
<F19a><!--line=28-->
<F19>3125,</F19>
</F19a>
<F71a><!--line=29-->
<F71G>
<Currency>EUR</Currency>
<Amount>10,</Amount>
</F71G>
</F71a>
</SeqC>
</MT102>
</Document>
</Block4>
</FinMessage>
Output
Output of the component for the above sample input.
{1:F01BNKACHZZBIC00000000000}{2:I101BNKBBEBBXBICU3005}{3:{113:XXXX}}{4:
:20:5362/MPB
:23:CREDIT
:50K:/1234567890
CONSORTIA PENSION SCHEME
FRIEDRICHSTRASSE, 27
8022-ZURICH
:71A:OUR
:36:1,6
:21:ABC/123
:32B:EUR1250,
:59:/001161685134
JOHANN WILLEMS
RUE JOSEPH II, 19
1040 BRUSSELS
:70:PENSION PAYMENT SEPTEMBER 2009
:33B:CHF2000,
:71G:EUR5,
:21:ABC/124
:32B:EUR1875,
:59:/510007547061MILLS
AVENUE LOUISE 213
1050 BRUSSELS
:70:PENSION PAYMENT SEPTEMBER 2003
:33B:CHF3000,
:71G:EUR5,
:32A:090828EUR3135,
:19:3125,
:71G:EUR10,
-}
An exception is thrown if the input is not a valid SWIFT MT message.
Functional Demonstration
Scenario 1 - Using MT101
This scenario demonstrates the transformation of a message in XML format to MT using MT101 message type.
Configure the XML2MT component with the MT year 2018 and provide the location for the schema.
Figure 3:XML2MT microservice configured with MT101 (2018) with the schema file path provided
Use Feeder and Display components to send sample input and check the response respectively.
Figure 4: Event process demonstrating Scenario 1
Sample Input
After running the event process, click the Send button in the Feeder window to send the following input message to the microservice.
Sample Input in the Feeder window
<?xml version="1.0" encoding="UTF-8"?>
<FinMessage xmlns="urn:swift:xsd:mtmsg.2018"><!--line=0-->
<Block1>
<ApplicationIdentifier>F</ApplicationIdentifier>
<ServiceIdentifier>01</ServiceIdentifier>
<LogicalTerminalAddress>SAESVAV0AXXX</LogicalTerminalAddress>
<SessionNumber>0466</SessionNumber>
<SequenceNumber>020121</SequenceNumber>
</Block1><!--line=0-->
<Block2>
<OutputIdentifier>O</OutputIdentifier>
<MessageType>101</MessageType>
<InputTime>1538</InputTime>
<MessageInputReference>
<Date>070522</Date>
<LTIdentifier>LRLRXXXX4</LTIdentifier>
<BranchCode>A07</BranchCode>
<SessionNumber>0000</SessionNumber>
<ISN>591065</ISN>
</MessageInputReference>
<Date>070522</Date>
<Time>1739</Time>
<MessagePriority>N</MessagePriority>
</Block2><!--line=0-->
<Block3><!--line=0-->
<F108>MT101 001 OF 019</F108>
</Block3><!--line=0-->
<Block4>
<Document xmlns="urn:swift:xsd:fin.101.2018">
<MT101>
<SeqA>
<F20a><!--line=1-->
<F20>00028</F20>
</F20a>
<F28a><!--line=2-->
<F28D>
<MessageIndex>1</MessageIndex>
<Total>1</Total>
</F28D>
</F28a>
<F50a_2><!--line=3-->
<F50H>
<Account>VTB.2003.02</Account>
<NameAndAddress>
<Line>19Apr2002</Line>
</NameAndAddress>
</F50H>
</F50a_2>
<F30a><!--line=5-->
<F30>020419</F30>
</F30a>
</SeqA>
<SeqB>
<F21a_1><!--line=6-->
<F21>x</F21>
</F21a_1>
<F32a><!--line=7-->
<F32B>
<Currency>USD</Currency>
<Amount>1,</Amount>
</F32B>
</F32a>
<F50a_1><!--line=8-->
<F50L>x</F50L>
</F50a_1>
<F59a><!--line=9-->
<F59>
<Account>x</Account>
<NameAndAddress>
<Line>x</Line>
</NameAndAddress>
</F59>
</F59a>
<F71a><!--line=11-->
<F71A>OUR</F71A>
</F71a>
</SeqB>
</MT101>
</Document>
</Block4><!--line=12-->
<Block5><!--line=12-->
<CHK>24857F4599E7</CHK><!--line=12-->
<TNG/>
</Block5>
</FinMessage>
Output
Figure 5: Display window with the output message for Scenario 1 input
Output in theDisplay window
{1:F01SAESVAV0AXXX0466020121}{2:O1011538070522LRLRXXXX4A0700005910650705221739N}{3:{108:MT101 001 OF 019}}{4:
:20:00028
:28D:1/1
:50H:/VTB.2003.02
19Apr2002
:30:020419
:21:x
:32B:USD1,
:50L:x
:59:/x
x
:71A:OUR
-}{5:{CHK:24857F4599E7}{TNG:}}
Scenario 2 - Using MT103
This scenario demonstrates the transformation of a message in XML format to MT using MT103 schema using MT103 message type.
Configure the XML2MT component with the MT year 2018 and provide the location for the schema.
Schema file used in this example is "fin.103.2018.xsd" from the sample schema location %FIORANO_HOME%\xml-catalog\fiorano\swift\mtxml\2018.
Sample Input
Sample Input in the Feeder window
<?xml version="1.0" encoding="UTF-8"?>
<FinMessage xmlns="urn:swift:xsd:mtmsg.2018"><!--line=0-->
<Block1>
<ApplicationIdentifier>F</ApplicationIdentifier>
<ServiceIdentifier>01</ServiceIdentifier>
<LogicalTerminalAddress>AAAAGRA0AXXX</LogicalTerminalAddress>
<SessionNumber>0057</SessionNumber>
<SequenceNumber>000289</SequenceNumber>
</Block1><!--line=0-->
<Block2>
<OutputIdentifier>O</OutputIdentifier>
<MessageType>103</MessageType>
<InputTime>0919</InputTime>
<MessageInputReference>
<Date>010321</Date>
<LTIdentifier>BBBBGRA0A</LTIdentifier>
<BranchCode>XXX</BranchCode>
<SessionNumber>0057</SessionNumber>
<ISN>000171</ISN>
</MessageInputReference>
<Date>010321</Date>
<Time>0920</Time>
<MessagePriority>N</MessagePriority>
</Block2><!--line=0-->
<Block3><!--line=0-->
<F108>MT103 003 OF 045</F108><!--line=0-->
<F121>c8b66b47-2bd9-48fe-be90-93c2096f27d2</F121>
</Block3><!--line=0-->
<Block4>
<Document xmlns="urn:swift:xsd:fin.103.2018">
<MT103>
<F20a><!--line=1-->
<F20>5387354</F20>
</F20a>
<F23a_1><!--line=2-->
<F23B>CRED</F23B>
</F23a_1>
<F23a_2><!--line=3-->
<F23E>
<InstructionCode>PHOB</InstructionCode>
<AdditionalInformation>20.527.19.60</AdditionalInformation>
</F23E>
</F23a_2>
<F32a><!--line=4-->
<F32A>
<Date>000526</Date>
<Currency>USD</Currency>
<Amount>1101,50</Amount>
</F32A>
</F32a>
<F33a><!--line=5-->
<F33B>
<Currency>USD</Currency>
<Amount>1121,50</Amount>
</F33B>
</F33a>
<F50a><!--line=6-->
<F50K>
<NameAndAddress>
<Line>FRANZ HOLZAPFEL GMBH</Line>
<Line>VIENNA</Line>
</NameAndAddress>
</F50K>
</F50a>
<F52a><!--line=8-->
<F52A>
<IdentifierCode>BKAUATWW</IdentifierCode>
</F52A>
</F52a>
<F59a><!--line=9-->
<F59>
<NameAndAddress>
<Line>723491524</Line>
<Line>C. KLEIN</Line>
<Line>BLOEMENGRACHT 15</Line>
<Line>AMSTERDAM</Line>
</NameAndAddress>
</F59>
</F59a>
<F71a_1><!--line=13-->
<F71A>SHA</F71A>
</F71a_1>
<F71a_2><!--line=14-->
<F71F>
<Currency>USD</Currency>
<Amount>10,</Amount>
</F71F>
</F71a_2>
<F71a_2><!--line=15-->
<F71F>
<Currency>USD</Currency>
<Amount>10,</Amount>
</F71F>
</F71a_2>
<F72a><!--line=16-->
<F72>
<NarrativeStructuredFormat>
<Line1>
<Code>INS</Code>
<Narrative>CHASUS33</Narrative>
</Line1>
</NarrativeStructuredFormat>
</F72>
</F72a>
</MT103>
</Document>
</Block4><!--line=17-->
<Block5><!--line=17-->
<CHK>DE1B0D71FA96</CHK>
</Block5>
</FinMessage>
Output
Figure 6: Display window with the output message for Scenario 2 input
Output in theDisplay window
{1:F01AAAAGRA0AXXX0057000289}{2:O1030919010321BBBBGRA0AXXX00570001710103210920N}{3:{108:MT103 003 OF 045}{121:c8b66b47-2bd9-48fe-be90-93c2096f27d2}}{4:
:20:5387354
:23B:CRED
:23E:PHOB/20.527.19.60
:32A:000526USD1101,50
:33B:USD1121,50
:50K:FRANZ HOLZAPFEL GMBH
VIENNA
:52A:BKAUATWW
:59:723491524
C. KLEIN
BLOEMENGRACHT 15
AMSTERDAM
:71A:SHA
:71F:USD10,
:71F:USD10,
:72:/INS/CHASUS33
-}{5:{CHK:DE1B0D71FA96}}