Error decoding a FieldList's FieldEntry

Can someone please can help? I have a question below.
I am encoding a message with following types, a refresh message embedded with element list of field list. When I encode a field entry with string, I get an error when I try to decode the message. The code fails on a call to rsslDecodeFieldEntry.

Best Answer

  • Bondy_Bo
    Answer ✓

    When decoding the field list’s entries, use the same iterator you used to decode the field list:

    if( ( ret = rsslDecodeFieldList(&decIterFieldlist, &fieldList, 0 ) ) == RSSL_RET_SUCCESS  )
    {
    RsslFieldEntry rsslFieldEntry ;
    ret = rsslDecodeFieldEntry( &decIterFieldlist, &rsslFieldEntry );
    }

    You can also perform encoding and decoding of multiple levels of data with a single iterator, if you wish. For an example, see the rsslEncDecExample application included in UPA releases.

Answers

  • When decoding the field list’s entries, use the same iterator you used to decode the field list:
    if( ( ret = rsslDecodeFieldList(&decIterFieldlist, &fieldList, 0 ) ) == RSSL_RET_SUCCESS )
    {
    RsslFieldEntry rsslFieldEntry ;
    ret = rsslDecodeFieldEntry( &decIterFieldlist, &rsslFieldEntry );
    }
    You can also perform encoding and decoding of multiple levels of data with a single iterator, if you wish. For an example, see the rsslEncDecExample application included in UPA releases.