On Wed, Feb 13, 2013 at 3:51 PM, sammm <[email protected]> wrote:
> Claus,
>
> thanks for that - i'd seen it and hoped it would do what i wanted but if
> errored in use.
>
> If i do this:
>
>       <setHeader headerName="CamelXsltResourceUri">
>               <xpath
> resultType="java.lang.String">concat('META-INF/xsl/',local-name(/*[local-name(.)='Envelope']/*[local-name(.)='Body']/*),'.xsl')</xpath>
>       </setHeader>
>       <to uri="xslt:${headers.CamelXsltResourceUri}"/>
>
> When i run the route (using 'camel:run' with maven) i get a
> BeanDefinitionStoreException:
>
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexpected exception parsing XML document from file
> [c:\dev\Workspaces\camel-rxservices\target\classes\META-INF\spring\camel-context.xml];
> nested exception is
> java.lang.NullPointerException
>         at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
>
> i.e. its erroring as it's trying to replace the header ref - is there a way
> to do this in XML config or does it need to be dne via Java DSL?
>

This is another kind of error. Make sure to use same version of Camel
and Spring in the  classpath.
And also mind if you add JAXB on the classpath, then there is a 2.2
for Java7 and 2.1 for Java6 etc.



> Thanks
>
> Martin
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Dynamic-XSL-source-with-2-8-6-tp5727501p5727513.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to