You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michal <ca...@yahoo.com> on 2007/10/26 09:40:58 UTC
sending none XML data through the bus
Suppose I have text message (not xml) in a queue. I want to use two
endpoints: queue consumer and bean provider
* Can I use NormalizedMessage.content as placeholder for this text message?
* If not where should I put it? NormalizedMessage.attachment,
NormalizedMessage.property?
Of course, I might wrap the text message with some node and now it would be
an xml - so using NormalizedMessage.content would be an obvious choice. But
I really don't like it: unecessary overhead.
thanks
Michal
--
View this message in context: http://www.nabble.com/sending-none-XML-data-through-the-bus-tf4695676s12049.html#a13422270
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: sending none XML data through the bus
Posted by Andrea Zoppello <zo...@tiscali.it>.
Hi,
The best solution i find is to put plain text
in a CDATA section indise a root xml element.
Guillaume Nodet ha scritto:
> You may have problems if you put a non xml thing inside the content of
> the normalized message, because lots of components assumes it is xml
> (though the container itself will support it), so I would advise to
> put it in a property or an attachment. If you plan to send a plain
> string, a property will work, but if you use a stream, an attachment
> would be better.
>
> On 10/26/07, Michal <ca...@yahoo.com> wrote:
>
>> Suppose I have text message (not xml) in a queue. I want to use two
>> endpoints: queue consumer and bean provider
>> * Can I use NormalizedMessage.content as placeholder for this text message?
>> * If not where should I put it? NormalizedMessage.attachment,
>> NormalizedMessage.property?
>>
>>
>> Of course, I might wrap the text message with some node and now it would be
>> an xml - so using NormalizedMessage.content would be an obvious choice. But
>> I really don't like it: unecessary overhead.
>>
>> thanks
>> Michal
>> --
>> View this message in context: http://www.nabble.com/sending-none-XML-data-through-the-bus-tf4695676s12049.html#a13422270
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>>
>
>
>
Re: sending none XML data through the bus
Posted by Guillaume Nodet <gn...@gmail.com>.
You may have problems if you put a non xml thing inside the content of
the normalized message, because lots of components assumes it is xml
(though the container itself will support it), so I would advise to
put it in a property or an attachment. If you plan to send a plain
string, a property will work, but if you use a stream, an attachment
would be better.
On 10/26/07, Michal <ca...@yahoo.com> wrote:
>
> Suppose I have text message (not xml) in a queue. I want to use two
> endpoints: queue consumer and bean provider
> * Can I use NormalizedMessage.content as placeholder for this text message?
> * If not where should I put it? NormalizedMessage.attachment,
> NormalizedMessage.property?
>
>
> Of course, I might wrap the text message with some node and now it would be
> an xml - so using NormalizedMessage.content would be an obvious choice. But
> I really don't like it: unecessary overhead.
>
> thanks
> Michal
> --
> View this message in context: http://www.nabble.com/sending-none-XML-data-through-the-bus-tf4695676s12049.html#a13422270
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/