qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Welchlin <andr...@welchlin.de>
Subject Re: Send a message using C++ which will be a JMS TextMessage
Date Mon, 08 Sep 2014 14:02:26 GMT
Hallo Gordon,

wow, you are so fast!

I just went to the kitchen to get a coffee and when I came back I had 
the correct answer :o)


Thank you very much! It works exactly like you said.

Regards
Andreas


Am 08.09.2014 um 15:55 schrieb Gordon Sim:
> 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
>



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


Mime
View raw message