camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Kalukiewicz <roman.kalukiew...@gmail.com>
Subject Re: Camel Content Filter
Date Mon, 27 Apr 2009 12:04:21 GMT
You can save the body in some header first, do the validation and then
reset the body using the header like

.setHeader("old", body())
.transform(xquery(<something>))
.to("validate:mySchema.xsl")
.transform(header("old"))

Roman

2009/4/22 ychawla <premiergeneration@yahoo.com>:
>
> 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.
>
>

Mime
View raw message