qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Send a message using C++ which will be a JMS TextMessage
Date Mon, 08 Sep 2014 13:55:03 GMT
On 09/08/2014 02:43 PM, Andreas Welchlin wrote:
> Hi List,
>
> I am sending messages to a JMS Service which runs at a third party.
>
> I use C++ qpid 0.28 with amqp 1.0.
>
> When the message is created it looks like this:
>
>      std::string messageContent("example text");
>      qpidMessage.setContentType("text/plain");
>      qpidMessage.setContent(qpid::types::Variant(messageContent));

Use Message::setContentObject() instead and set the encoding, e.g. 
change the last line to:

       qpidMessage.setContentObject(messageContent);
       qpidMessage.getContentObject().setEncoding("utf8");



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message