Try putting in a call to pn_message_set_inferred(message, true) prior to
encoding the message. That should alter how pn_message_encode renders the
body.

--Rafael


On Sat, Aug 2, 2014 at 6:29 PM, Tom Mathews <[email protected]> wrote:

> I've finally tracked down an issue between our clients and server, it
> seems the server expects amqp:data:binary payloads, but we're sending a
> single byte array as an amqp:amqp-value:* payload. How do I set this to be
> a data:binary payload?
>
> Current code that's setting a message with an Amqp Value:
>                 pn_data_t *body = pn_message_body(message);
>
> result = pn_data_put_binary(body, pn_bytes(m_dataLength,
> (char*)(dataPtr)));
>                 pn_message_encode(message, m_encodedData, &m_encodedSize);
> pn_delivery_t* delivery = pn_delivery(m_senderInstance->GetSender(),
> pn_dtag(m_tag, strnlen(m_tag, TAG_SIZE)));
>
> Thank you!
>
> -TomM
>

Reply via email to