Sure, good idea.
I guess the problem is to find a relevant place in the wiki :-(
On Jan 17, 2008 1:01 PM, intalio314 <[EMAIL PROTECTED]> wrote:
>
>
>
> gnodet wrote:
> >
> > What did the target component put in the Out response ?
> > If you send a copy of the In message, it may already be consumed (being
> an
> > xml document based on the socket input stream), hence the Stream Closed
> > exception.
> >
>
> I used the examples in the servicemix-bean docs, namely (relevant parts
> only):
>
> Echo example :
> MessageUtil.transferInToOut(exchange, exchange);
> channel.send(exchange);
>
> Message Processing example:
>
> NormalizedMessage message = exchange.getMessage("in");
> Source content = message.getContent();
> message.setContent(content);
> exchange.setMessage(message, "out");
> channel.send(exchange);
>
> They both fail. But what you said gave me a clue, so I tried with:
>
> NormalizedMessage msg = exchange.createMessage();
> String test = "<content>Sample Result</content>";
> Source src = new StreamSource(new StringReader(test));
> msg.setContent(src);
> exchange.setMessage(msg, "out");
> channel.send(exchange);
>
> And this works! (and in the process I just found that SMX defines a new
> StringSource(test) which comes handy, too).
>
> So thanks again. Would it be considered useful if I wrote a small article
> on
> the whole issue?
>
>
> Cheers
> --
> View this message in context:
> http://www.nabble.com/%3A---Can%27t-get-a-simple-connection-to-work-tp14903524s12049p14917351.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/