You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Pontus Ullgren <ul...@gmail.com> on 2017/08/10 08:01:15 UTC

XPath with namespaces, Spring DSL and Spring Boot

Hi,

I have a problem I've been unable to solve with the combination specified
in the subject.

The problem is that when using the Spring DSL the namespaces should be
defined in the camelContext element of the XML file. However when using the
Camel Spring Boot support there is no camelContext element. Instead route
fragment files are imported.

Is there any way to get the namespace definitions into the camleContext by
defining a @Bean ?

Thanks
Pontus Ullgren

Re: XPath with namespaces, Spring DSL and Spring Boot

Posted by Pontus Ullgren <ul...@gmail.com>.
Hi,

Thanks for a quick response.

It turns out this works great in 2.18.4 (and 2.19.2) but not in 2.18.1
which was the version I was running.
Upgrading solves the problem.

Thanks again
Pontus


On Thu, 10 Aug 2017 at 23:57 Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> Ah can you try set the namespaces on the outer <routes> element.
>
> On Thu, Aug 10, 2017 at 10:01 AM, Pontus Ullgren <ul...@gmail.com>
> wrote:
> > Hi,
> >
> > I have a problem I've been unable to solve with the combination specified
> > in the subject.
> >
> > The problem is that when using the Spring DSL the namespaces should be
> > defined in the camelContext element of the XML file. However when using
> the
> > Camel Spring Boot support there is no camelContext element. Instead route
> > fragment files are imported.
> >
> > Is there any way to get the namespace definitions into the camleContext
> by
> > defining a @Bean ?
> >
> > Thanks
> > Pontus Ullgren
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: XPath with namespaces, Spring DSL and Spring Boot

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah can you try set the namespaces on the outer <routes> element.

On Thu, Aug 10, 2017 at 10:01 AM, Pontus Ullgren <ul...@gmail.com> wrote:
> Hi,
>
> I have a problem I've been unable to solve with the combination specified
> in the subject.
>
> The problem is that when using the Spring DSL the namespaces should be
> defined in the camelContext element of the XML file. However when using the
> Camel Spring Boot support there is no camelContext element. Instead route
> fragment files are imported.
>
> Is there any way to get the namespace definitions into the camleContext by
> defining a @Bean ?
>
> Thanks
> Pontus Ullgren



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2