FMXML Handler
Introduction
The FMXML handler is a FIXEdge component used in BL configurations. Its primary task to convert any FIX message (except MsgType(35)=n) to XML representation. In case of 35=n messages, the FMXML handler does the reverted conversion. An example of a FIX message and the result of such conversion is given in the table below:
FIX 4.4 representation | FMXML representation |
---|---|
8=FIX.4.4 | <FIXMessage> <f8>FIX.4.4</f8> <f35>D</f35> <f49>FTRDRETD0</f49> <f56>IDEALRETD0</f56> <f43>N</f43> <f52>20131118-10:21:56</f52> <f97>N</f97> <f115>NFSC</f115> <f2007>e6a85d48-81df-40c3-a54c-23b2aa85191b:RETAILEQUITY</f2007> <f21>2</f21> <f22>1</f22> <f48>0456BC5L1</f48> <f54>1</f54> <f38>1000</f38> <f40>1</f40> <f44>0</f44> <f59>1</f59> <f1>Account10</f1> <f2002>CH1</f2002> <f2005>12345</f2005> <f2000>Act10Name</f2000> <f2001>N</f2001> <f2003>C1TD</f2003> <f11>e6a85d48-81df-40c3-a54c-23b2aa85191b</f11> <f60>20131118-05:21:46</f60> <f2008>G12345</f2008> <f2011>Rep1</f2011> </FIXMessage> |
Typical use case
Here is a sequence diagram for a typical FMXML's use case.
There are three main components in it:
- FIX session: FIXEdge receives FIX messages from it (say FIX messages with 35=D)
- FMXML handler: FIXEdge converts source messages to XML and wrap them into 35=n messages.
- IBM MQ Transport adapter: FIXEdge sends XML data wrapped into 35=n messages to an external messaging system (IBM WebSphere in this case).
FMXML handler specification
The FMXML handler does the following steps on FIX massages:
- If there is 35=n message in the input of the handler then FMXML to FIX transformation takes place.Â
- In case of other MsgType messages in the input of the handler FIX to FMXML transformation takes place.Â
- Standard FIX tags like CheckSum (10), BodyLength(9), MsgSeqNum(34) are ignored during transformations.
FMXML format specification
<FIXMessage> <!-- FIX tags --> <f[tag1]>value1</f[tag1]> <f[tag2]>value2</f[tag2]> <!-- FIX repeating group --> <g[tag3] v="value3"> <e> <f[tag4]>value4</f[tag4]> </e> <e> <f[tag5]>value5</f[tag5]> </e> </g[tag3]> </FIXMessage>
Further XML message transformations
It is not necessary that external system can process XML messages in the format the FMXML Handler produces. One may use XSLT transformations to transform FMXML output to any XML schema.Â
Date/Time conversations
By default the FMXML handler does not change values of FIX tags during transformations. However there are differences between Date/Time data representation in FIX and in XML. See the table below for further details.
FIX | XML | |
---|---|---|
UTCTimestamp | YYYYMMDD-HH:MM:SS YYYYMMDD-HH:MM:SS.sss | YYYY-MM-DDTHH:MM:SS YYYY-MM-DDTHH:MM:SS.sss |
UTCDateOnly | YYYYMMDD | YYYY-MM-DD |
LocalMktDate | YYYYMMDD | YYYY-MM-DD |
Â
 Use the ConvertDateTime = "true" attribute to convert date/time values properly. See the example of BL rule:
<DllHandlers> <Handler Name="FMXMLHandler" Description="FMXML Handler" DllName="bin/FMXMLHandler-vc10-MD-x64.dll" VerifyHandlersVersion="true" ProcessorsCount="2" /> </DllHandlers> <Rule> <Source> <Client Name="SplitterTA" /> </Source> <Condition> <MatchField Field="35" Value="n" /> </Condition> <Action> <Script Language="XSLT" Field="213" LengthField="212" FileName="AE.xslt"/> <HandlerAction Name="FMXMLHandler" ConvertDateTime = "true"/> <Send> <FixSession/> </Send> </Action> </Rule>