{{Quickfixn}} creating a message from a string
Fredrik S Loekke
fsl at lindcapital.com
Fri Mar 7 01:31:30 PST 2014
Hi
I’m trying to create QuickFix Messages like this:
new QuickFix.Message(@"8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0", true);
But I’m always getting the following error: (with the error happening at various positions)
What am I missing?
QuickFix.MessageParseError was unhandled by user code
HResult=-2146233088
Message=Could not parse message: Error at position (2) while parsing msg (8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0)
Source=QuickFix
StackTrace:
at QuickFix.Message.ExtractField(String msgstr, Int32& pos, DataDictionary sessionDD, DataDictionary appDD)
at QuickFix.Message.ExtractField(String msgstr, Int32& pos)
at QuickFix.Message.FromStringHeader(String msgstr)
at QuickFix.Message..ctor(String msgstr, DataDictionary sessionDataDictionary, DataDictionary appDD, Boolean validate)
at QuickFix.Message..ctor(String msgstr, Boolean validate)
at BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.SellSideTcrOnSubmissionMessage() in c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line 37
at BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.ShouldNeverReturnNull() in c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line 16
InnerException: System.ArgumentOutOfRangeException
HResult=-2146233086
Message=Length cannot be less than zero.
Parameter name: length
Source=mscorlib
ParamName=length
StackTrace:
at System.String.Substring(Int32 startIndex, Int32 length)
at QuickFix.Message.ExtractField(String msgstr, Int32& pos, DataDictionary sessionDD, DataDictionary appDD)
InnerException:
Best regards / Med venlig hilsen
Fredrik Skeel Løkke
Software Developer ǀ IT & Analysis
Mob.: +45 3176 8438
fsl at lindcapital.com<mailto:fsl at lindcapital.com>
[Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: cid:image001.png at 01CD4A0C.218B6960]
Lind Capital A/S
Værkmestergade 3, 2
DK-8000 Aarhus C
www.lindcapital.com<http://www.lindcapital.com/>
Follow us on
[linkedin]<http://www.linkedin.com/company/lind-capital-a-s> [facebook] <http://www.facebook.com/LindCapital>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/d587069d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9967 bytes
Desc: image001.png
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/d587069d/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2050 bytes
Desc: image002.png
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/d587069d/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1677 bytes
Desc: image003.png
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/d587069d/attachment-0005.png>
More information about the Quickfixn
mailing list