On Tue, Jul 23, 2013 at 01:59:19PM -0700, amqp1 wrote:
> 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);
Try putting here:
printf("type=%s (%d)\n", pn_type_name(type), (int)type);
and see what it outputs. Then compare that with the values in
proton/types.h
>
> 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]
>
--
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
pgpWBqyqsggGU.pgp
Description: PGP signature
