You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Illtud Daniel <il...@llgc.org.uk> on 2010/12/07 12:11:41 UTC

Importing routes from other XML files

Yes, I know it's a FAQ, my problem is that:

http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html

Doesn't work. It appears (from googling) that the imported file needs
a <beans> element and namespace declarations, which are missing from
that FAQ entry, although it appears to show the entirety of the included
file.

Can that FAQ entry be fixed? It appears that the question is still
being asked frequently as the FAQ doesn't answer it correctly.

Is there somewhere else that I should direct corrections to the
documentation? There's a lot more XML configuration examples that
I'd like added, they take a while to work out if there's no example.

-- 
Illtud Daniel                                 illtud.daniel@llgc.org.uk
Prif Swyddog Technegol                          Chief Technical Officer
Llyfrgell Genedlaethol Cymru                  National Library of Wales

Re: Importing routes from other XML files

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Dec 7, 2010 at 3:20 PM, Illtud Daniel <il...@llgc.org.uk> wrote:
> Claus Ibsen wrote:
>>
>> On Tue, Dec 7, 2010 at 12:29 PM, Claus Straube <cl...@catify.com>
>> wrote:
>>>
>>> Hi Daniel,
>>>
>>> I think this is not part of the documentation, because it's a native
>>> spring
>>> functionality. With
>>>
>>> <import resource="myCoolRoutes.xml"/>
>>>
>>> you're importing a new Spring context and here of course you need a
>>> surrounding bean element.
>
> But those of us whose only exposure to spring is via camel wouldn't
> know that, the page (did) make it appear that the entire
> myCoolRoutes.xml file was being shown and there were no bean element
> nor namespace declaration.
>
>> I have updated the wiki page to include the spring bean xml stuff you
>> need as well.
>
> Great, that's all I wanted. Thanks.
>
> Is this the right place to post extra xml configuration examples
> to be added? For example, figuring out how to do:
>
> .setHeader(HttpConstants.HTTP_URI, constant("http://newhost"))
>
> in XML is nowhere in the documentation.
>
> (<setHeader headerName="CamelHttpUri"> if anybody's
> googling for this, by the way)

We love contributions and help. See here about helping with the documentation
http://camel.apache.org/contributing.html



>
> --
> Illtud Daniel                                 illtud.daniel@llgc.org.uk
> Prif Swyddog Technegol                          Chief Technical Officer
> Llyfrgell Genedlaethol Cymru                  National Library of Wales
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Importing routes from other XML files

Posted by Illtud Daniel <il...@llgc.org.uk>.
Claus Ibsen wrote:
> On Tue, Dec 7, 2010 at 12:29 PM, Claus Straube <cl...@catify.com> wrote:
>> Hi Daniel,
>>
>> I think this is not part of the documentation, because it's a native spring
>> functionality. With
>>
>> <import resource="myCoolRoutes.xml"/>
>>
>> you're importing a new Spring context and here of course you need a
>> surrounding bean element.

But those of us whose only exposure to spring is via camel wouldn't
know that, the page (did) make it appear that the entire
myCoolRoutes.xml file was being shown and there were no bean element
nor namespace declaration.

> I have updated the wiki page to include the spring bean xml stuff you
> need as well.

Great, that's all I wanted. Thanks.

Is this the right place to post extra xml configuration examples
to be added? For example, figuring out how to do:

.setHeader(HttpConstants.HTTP_URI, constant("http://newhost"))

in XML is nowhere in the documentation.

(<setHeader headerName="CamelHttpUri"> if anybody's
googling for this, by the way)

-- 
Illtud Daniel                                 illtud.daniel@llgc.org.uk
Prif Swyddog Technegol                          Chief Technical Officer
Llyfrgell Genedlaethol Cymru                  National Library of Wales

Re: Importing routes from other XML files

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Dec 7, 2010 at 12:29 PM, Claus Straube <cl...@catify.com> wrote:
> Hi Daniel,
>
> I think this is not part of the documentation, because it's a native spring
> functionality. With
>
> <import resource="myCoolRoutes.xml"/>
>
> you're importing a new Spring context and here of course you need a
> surrounding bean element.
>

Yeah its a spring feature.

I have updated the wiki page to include the spring bean xml stuff you
need as well.
https://cwiki.apache.org/confluence/display/CAMEL/How+do+I+import+routes+from+other+XML+files


> Best regards - Claus
>
>
> On 07.12.2010 12:11, Illtud Daniel wrote:
>>
>> Yes, I know it's a FAQ, my problem is that:
>>
>> http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html
>>
>> Doesn't work. It appears (from googling) that the imported file needs
>> a <beans> element and namespace declarations, which are missing from
>> that FAQ entry, although it appears to show the entirety of the included
>> file.
>>
>> Can that FAQ entry be fixed? It appears that the question is still
>> being asked frequently as the FAQ doesn't answer it correctly.
>>
>> Is there somewhere else that I should direct corrections to the
>> documentation? There's a lot more XML configuration examples that
>> I'd like added, they take a while to work out if there's no example.
>>
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Importing routes from other XML files

Posted by Claus Straube <cl...@catify.com>.
Hi Daniel,

I think this is not part of the documentation, because it's a native 
spring functionality. With

<import resource="myCoolRoutes.xml"/>

you're importing a new Spring context and here of course you need a 
surrounding bean element.

Best regards - Claus


On 07.12.2010 12:11, Illtud Daniel wrote:
> Yes, I know it's a FAQ, my problem is that:
>
> http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html
>
> Doesn't work. It appears (from googling) that the imported file needs
> a <beans> element and namespace declarations, which are missing from
> that FAQ entry, although it appears to show the entirety of the included
> file.
>
> Can that FAQ entry be fixed? It appears that the question is still
> being asked frequently as the FAQ doesn't answer it correctly.
>
> Is there somewhere else that I should direct corrections to the
> documentation? There's a lot more XML configuration examples that
> I'd like added, they take a while to work out if there's no example.
>