You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Maxim Y. Tebenev" <mt...@softech.ru> on 2007/03/09 18:54:52 UTC

Working with message content

Hi Guys,

I'm trying to match message content using XPathHelper object and got
following problem: I cannot obtain it twice. Followed by recommendations in
'usage of SourceTransformer' post I've used
org.apache.servicemix.jbi.util.MessageUtil class to copy message but faced
with the same problem as message proceedes to other components in ESB. 

My component extends AbstractAuditor class. So my question is how to
correctly obtain XML message body in auditor and work with its content?

Best regards, Maxim Tebenev.
-- 
View this message in context: http://www.nabble.com/Working-with-message-content-tf3377189s12049.html#a9399396
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Working with message content

Posted by "Maxim Y. Tebenev" <mt...@softech.ru>.
Hi Guillaume,

Thanks for your help! That works.

Best regards, Maxim Tebenev.
-- 
View this message in context: http://www.nabble.com/Working-with-message-content-tf3377189s12049.html#a9410752
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Working with message content

Posted by Guillaume Nodet <gn...@gmail.com>.
Once the message has been read, it may become unusable if it was based
on a stream.  You need to transform the source into a re-readable xml format
(for example dom).  Once done, you need to set the exchange source to this
dom document so that the target component can read it too.
There are other things that can work too: using exchange.toString(),
or serializing the exchange.  Both calls will automatically transform the
source to a rereadable one.

On 3/9/07, Maxim Y. Tebenev <mt...@softech.ru> wrote:
>
>
> Hi Guys,
>
> I'm trying to match message content using XPathHelper object and got
> following problem: I cannot obtain it twice. Followed by recommendations
> in
> 'usage of SourceTransformer' post I've used
> org.apache.servicemix.jbi.util.MessageUtil class to copy message but faced
> with the same problem as message proceedes to other components in ESB.
>
> My component extends AbstractAuditor class. So my question is how to
> correctly obtain XML message body in auditor and work with its content?
>
> Best regards, Maxim Tebenev.
> --
> View this message in context:
> http://www.nabble.com/Working-with-message-content-tf3377189s12049.html#a9399396
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/