Hi
There will and are several solutions to your problem.
You can use a processor to call another "route" so to speak. And then
inspect the result, and decide what to do.
from (a) -> processor -> route after validation
And in the processor you can "call the other route and inspect the response"
// make a copy to send so it wont affect the original exchange
Exchange copy = exchange.copy();
// send the copy and wait for the response
Exchange validation = exchange.createNewProuducerTemplate().send("uri
to the xslt route", copy);
In Camel 2.0 we have added the enricher DSL so you can do this more
elegant in the route DSL directly.
http://camel.apache.org/content-enricher.html
On Wed, Apr 22, 2009 at 4:56 PM, ychawla <[email protected]> wrote:
>
> Hello All,
> I have a question about the usage of the content filter. I have a route
> where I want to validate the message, but I only want to validate a certain
> part of the message. I looked at the content filter pattern and it didn't
> seem like Camel had much built in functionality there:
>
> http://camel.apache.org/content-filter.html
>
> In the Spring XML, it referenced having a bean do a transform:
> <bean ref="myBeanName" method="doTransform"/>
>
> What I would like to do is to pass part of a message using xquery to the
> validation component. Something like this:
>
> <setBody>
> <xquery>//tns:pathToMyElementToValidate</xquery>
> </setBody>
> <to uri="validator:http://foo.com/mySchema.xsd"/>
>
> The above code works, but the body of my message is now the xquery result
> for further endpoints rather than the whole message.
>
> Is there a way to filter an XML node for one endpoint and then go back to
> using the original message for the following endpoints?
>
> Thanks,
> Yogesh
>
> --
> View this message in context:
> http://www.nabble.com/Camel-Content-Filter-tp23175505p23175505.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration