Hi ,
I didn't receive any response yet from QFJ guys. This is a critical bug
because without repeating group support we cannot say Synapse supports
FIX messaging, almost every FIX user use repeating group even a small
broker firm.
So we have two options
[1] Fix the bug in QFJ side and use data dictionary to identify the
repeating groups. Accessing the DD for each FIX message will effect our
message processing time because I noticed that API calls for the data
dictionary is very slow.
[2] Change the way Synapse do the FIX transformation to XML infoset . -
Current implementation access the qfj.Message and iterate through the
data structures provided by qfj and build the AXIOM tree. My proposal is
to use a simple way and it will cut down the 100+ code to 14 lines of code.
This is the code snippet
String fixToXML = message.toXML().replaceAll("\n","");
InputStream is = new ByteArrayInputStream(fixToXML.getBytes());
XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(is);
StAXOMBuilder builder = new StAXOMBuilder(parser);
OMElement documentElement = builder.getDocumentElement();
SOAPFactory soapFactory = new SOAP11Factory();
documentElement.addAttribute(soapFactory.createOMAttribute(FIXConstants.FIX_MESSAGE_INCOMING_SESSION,
null, sessionID));
System.out.println (documentElement.toString());
SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
envelope.getBody().addChild(documentElement);
msgCtx.setEnvelope(envelope);
This will basically create the AXIOM tree using the qfj.Message.toXML().
Few changes will apply for the current implementation
1. Will not have CDATA section in the xml infoset
2. Attribute "id" in the element "Field" will rename as "tag"
3. Will not check binary content (FIX is not made to send binary data,
and from my past experience with the FIX users none of them sent binary
with FIX , FAST is there for binary transports for financial messaging)
I did apply this change to my local workspace and it is working
perfectly with the FIX scenarios we have and it supports ***repeating
groups*** as well.
WDYT ?
If every one is happy with this change I can provide the relevant patch.
Asanka A.
There is a blocker in the QFJ side on accessing repeating groups, I
have created the relevant issues on QFJ issue list (Jiras - QFj-330,
QFj-329), we have to wait for the QFj devs comments to proceed.
Asanka A.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]