Oh yes, I posted this via the Web interface...don't know why it didn't make
it into the list...

    pn_data_t *body = pn_message_body(amqpMessage);

    while (pn_data_next(body))
    {
        pn_type_t type = pn_data_type(body);

        switch (type)
        {
        case PN_BINARY:
        {
            break;
        }
        case PN_LONG:
        {
            break;
        }
        case PN_DOUBLE:
        {
            break;
        }
        case PN_STRING:
        {
            pn_data_enter(body);
            pn_data_next(body);

            pn_bytes_t s = pn_data_get_string(body);

            char terminatedString[256];

            snprintf(terminatedString, s.size, "%s", s.start);

            pn_data_exit(body);

            break;
        }
    }



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Using-Qpid-Proton-0-4-to-iterate-over-arbitrary-AMQP-message-tp7595828p7595841.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to