Problems in using the NoPartyIDs Block

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems in using the NoPartyIDs Block

gore
I construct my parties block for a NewOrderSingle the following way:

******** CODE ********

int partyIDcnt = 0; // counter for the NoPartyIDs tag, incremented for every field added PartyID
NewOrderSingle.NoPartyIDs partiesBlock = new NewOrderSingle.NoPartyIDs(); // the empty parties block

if (!partyID.equals(""))
{
        partiesBlock.set(partyID);
        partyIDcnt++;
}
if (!partyIDSource.toString().equals(""))
{
        partiesBlock.set(partyIDSource);
        partyIDcnt++;
}
if (!partyRole.toString().equals(""))
{
        partiesBlock.set(partyRole);
        partyIDcnt++;
}

newOrderSingle.addGroup(partiesBlock);
NoPartyIDs noPartyIDs = new NoPartyIDs(partyIDcnt);
newOrderSingle.set(noPartyIDs);

******** /CODE ********

I get a 'Message Rejected: Conditionally Required Field Missing' error from my Acceptor. I don't see any field missing, as all fields in the parties block are no compulsory fields. Any ideas or experience with creating the parties block? Is there any code-source for the right implementation of a parties block and the NoPartyIDs to a NewOrderSingle?

My if conditions are ok, as all of the three values are received by the Acceptor in the message.

Thanks for any support!
Reply | Threaded
Open this post in threaded view
|

Re: Problems in using the NoPartyIDs Block

toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Gregor,

If i'm not mistaken, you are only inserting 1 group instead of 3.
You are inserting 3 fields that all belong to the same repeating
group, but only one group.

so try it with NoPartyID to 1.

also, if i'm not mistaken, you don't actually need to set the
NoPartyID field at all - the underlying QFJ code will set the totall #
of repeating groups for you. You only need to set it if the number of
groups is 0.

see this writeup for reference:
http://www.quickfixj.org/quickfixj/usermanual/usage/repeating_groups.html

On 5/22/07, gore <[hidden email]> wrote:

> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
> I construct my parties block for a NewOrderSingle the following way:
>
> ******** CODE ********
>
> int partyIDcnt = 0; // counter for the NoPartyIDs tag, incremented for every
> field added PartyID
> NewOrderSingle.NoPartyIDs partiesBlock = new NewOrderSingle.NoPartyIDs(); //
> the empty parties block
>
> if (!partyID.equals(""))
> {
>         partiesBlock.set(partyID);
>         partyIDcnt++;
> }
> if (!partyIDSource.toString().equals(""))
> {
>         partiesBlock.set(partyIDSource);
>         partyIDcnt++;
> }
> if (!partyRole.toString().equals(""))
> {
>         partiesBlock.set(partyRole);
>         partyIDcnt++;
> }
>
> newOrderSingle.addGroup(partiesBlock);
> NoPartyIDs noPartyIDs = new NoPartyIDs(partyIDcnt);
> newOrderSingle.set(noPartyIDs);
>
> ******** /CODE ********
>
> I get a 'Message Rejected: Conditionally Required Field Missing' error from
> my Acceptor. I don't see any field missing, as all fields in the parties
> block are no compulsory fields. Any ideas or experience with creating the
> parties block? Is there any code-source for the right implementation of a
> parties block and the NoPartyIDs to a NewOrderSingle?
>
> My if conditions are ok, as all of the three values are received by the
> Acceptor in the message.
>
> Thanks for any support!
> --
> View this message in context: http://www.nabble.com/Problems-in-using-the-NoPartyIDs-Block-tf3796035.html#a10736855
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems in using the NoPartyIDs Block

gore
Toli, thanks for your answer.

The counter is useless. i figured that out yesterday, because my initiator set the NoPartyIDs to 1 anyway in the message. I get the 'Conditionally required field missing' error anyway. When i looked at the source code of the NewOrderSingle class the embedded NoPartyIDs class uses array for the field order with 5 fields, instead of just PartyID, PartyIDSource, PartyRole and its inner PartySubIDs Block. The last field in the array is set to 0. But there is no Quickfix field 0. Maybe that's the problem?

Any ideas?

toli wrote
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
Gregor,

If i'm not mistaken, you are only inserting 1 group instead of 3.
You are inserting 3 fields that all belong to the same repeating
group, but only one group.

so try it with NoPartyID to 1.

also, if i'm not mistaken, you don't actually need to set the
NoPartyID field at all - the underlying QFJ code will set the totall #
of repeating groups for you. You only need to set it if the number of
groups is 0.

see this writeup for reference:
http://www.quickfixj.org/quickfixj/usermanual/usage/repeating_groups.html

On 5/22/07, gore <gregor.marboe@qualysoft.com> wrote:
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
>
> I construct my parties block for a NewOrderSingle the following way:
>
> ******** CODE ********
>
> int partyIDcnt = 0; // counter for the NoPartyIDs tag, incremented for every
> field added PartyID
> NewOrderSingle.NoPartyIDs partiesBlock = new NewOrderSingle.NoPartyIDs(); //
> the empty parties block
>
> if (!partyID.equals(""))
> {
>         partiesBlock.set(partyID);
>         partyIDcnt++;
> }
> if (!partyIDSource.toString().equals(""))
> {
>         partiesBlock.set(partyIDSource);
>         partyIDcnt++;
> }
> if (!partyRole.toString().equals(""))
> {
>         partiesBlock.set(partyRole);
>         partyIDcnt++;
> }
>
> newOrderSingle.addGroup(partiesBlock);
> NoPartyIDs noPartyIDs = new NoPartyIDs(partyIDcnt);
> newOrderSingle.set(noPartyIDs);
>
> ******** /CODE ********
>
> I get a 'Message Rejected: Conditionally Required Field Missing' error from
> my Acceptor. I don't see any field missing, as all fields in the parties
> block are no compulsory fields. Any ideas or experience with creating the
> parties block? Is there any code-source for the right implementation of a
> parties block and the NoPartyIDs to a NewOrderSingle?
>
> My if conditions are ok, as all of the three values are received by the
> Acceptor in the message.
>
> Thanks for any support!
> --
> View this message in context: http://www.nabble.com/Problems-in-using-the-NoPartyIDs-Block-tf3796035.html#a10736855
> Sent from the QuickFIX/J mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> Quickfixj-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>


--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Quickfixj-users mailing list
Quickfixj-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/quickfixj-users