I am attempting to use Synapse to act as an HTTP to FIX proxy much like
sample 258. I am using the latest Synapse snapshot. Updated all
libraries with maven and built successfully.
The issue I'm having is that it does not seem to be handling FIX
repeating groups properly (or, I'm missing something important to make
that happen). I am submitting the following (POX) to the service as
content-type application/xml :
<message>
<header>
<field id="35">V</field>
</header>
<body>
<field id="262">12345</field>
<field id="263">0</field>
<field id="264">1</field>
<field id="265">0</field>
<field id="267">1</field>
<field id="269">0</field>
<field id="146">1</field>
<field id="55">USD/CAD</field>
</body>
<trailer />
</message>
According to the console, Synapse is wrapping it into a SOAP envelope as
expected:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<message>
<header>
<field id="35">V</field>
</header>
<body>
<field id="262">12345</field>
<field id="263">0</field>
<field id="264">1</field>
<field id="265">0</field>
<field id="267">1</field>
<field id="269">0</field>
<field id="146">1</field>
<field id="55">USD/CAD</field>
</body>
<trailer />
</message>
</soapenv:Body>
</soapenv:Envelope>
The FIX session is set to use FIX.4.2 (actually, a customized data
dictionary based on FIX 4.2 ... but I see this same problem whether I
use the stock FIX42.xml data dictionary or my own custom dictionay).
So far so good. Synapse opens the FIX connection to the FIX acceptor,
logs in and transmits the message. However, the problem lies here. The
message fields have been reordered. Field 146 is a repeating group and
field 55 is a field within that group. The FIX protocol spec states that
these fields must be transmitted in order -- i.e. field 146 followed by
field 55. But this is not what is occurring. Here is the outgoing message:
<20090525-04:41:12, FIX.4.2:ESB->FIXSERVER, outgoing>
(8=FIX.4.2^9=143^35=V^34=2^49=ESB^52=20090525-04:41:12.167^56=FIXSERVER^*55=USD/CAD^146=1*^262=12345^263=0^264=1^265=0^267=1^269=0^10=045^)
**** Note how the 55 and 146 fields are in the wrong order in the
outgoing message. 146 must come immediately before 55 according to the
FIX spec. ****
The response received is:
<20090525-04:41:12, FIX.4.2:ESB->FIXSERVER, incoming>
(8=FIX.4.2^9=127^35=3^34=2^49=FIXSERVER^52=20090525-04:41:13.389^56=ESB^45=2^58=Tag
not defined for this message type^371=55^372=V^373=2^10=240^)
The FIX acceptor is rejecting the message, correctly, because the fields
are out of order and therefore tag 55 is not defined for that message
type (unless within a repeating goup).
Am I missing something, or is this a bug? How does the Synapse FIX
transport know about repeating groups, to know to pass these in the
right order? Thanks.
Marc