-
1. Re: Where is camelContext? XSD
davsclaus Mar 20, 2009 10:29 AM (in response to jucaro)The namespace for Apache Camel has changed because Apache Camel graduated as a Apache Top Level Project a few months ago.
That is why there are two namespaces in examples, and in the Camel wiki documentation.
Camel 1.x still uses and will only use the old location name, eg: activemq.apache.org/camel
Camel 2.0 and onwards will use the new location name: camel.apache.org
As the Camel wiki documentation examples is often snippets from real unit tests from the SVN trunk, its thus based on Camel 2.0.
In your case the old location should be used for Camel 1.x.
I am not an Eclipse fanatic so I dont know how to configure XSD locations. In IDEA you just press ctrl + space like autocomplete for namespaces it does not understand yet. Maybe there is something like that in Eclipse.
-
2. Re: Where is camelContext? XSD
jucaro Mar 20, 2009 12:43 PM (in response to davsclaus)Hi!
Thanks for the explanation.
I found that the project will be "Camel 1.x" ready if I create the project using the camel-archetype-activemq (here is how) maven archetype, it it is helpful for someone else.
bye,
Juan
Edited by: jucaro on Mar 20, 2009 4:43 PM
-
3. Re: Where is camelContext? XSD
prossman Aug 27, 2010 9:23 AM (in response to jucaro)... I just stumbled across the same thing.
It turns out that if you go to http://activemq.apache.org/camel/schema/spring/camel-spring.xsd, there is a re-direct to http://camel.apache.org/schema/spring/camel-spring.xsd.
However, the schema located at the latter doesn't have target namespace 'http://activemq.apache.org/camel/schema/spring', but uses target namespace 'http://camel.apache.org/schema/spring'.
So:
If you're using archetype servicemix-camel-service-unit with archetype version=2010.01.0-fuse-02-00, you're getting a camel-context.xml file that declares a namespace that is undefined in the schema it references.
-
4. Re: Where is camelContext? XSD
davsclaus Aug 27, 2010 9:29 AM (in response to prossman)The activemq namespace is for Camel 1.x
The camel namespace is for Camel 2.x.
So use the one that fits your version of Camel.
-
5. Re: Where is camelContext? XSD
prossman Aug 27, 2010 9:35 AM (in response to davsclaus)Yes, I understood that.
Nevertheless, Eclipse will give you a validation error for the camel-context.xml file if your xsi:schemaLocation attribute reads:
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"
This is because when retrieving the schema from this URL, it ends up at http://camel.apache.org/schema/spring/camel-spring.xsd - where you have a schema with targetNamespace="http://camel.apache.org/schema/spring".
-
6. Re: Where is camelContext? XSD
prossman Aug 27, 2010 9:39 AM (in response to prossman)Solution:
Change...
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"
... to...
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring http://camel.apache.org/schema/spring/camel-spring-1.6.3.xsd"