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.
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.
Edited by: jucaro on Mar 20, 2009 4:43 PM
... 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.
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.
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.
Yes, I understood that.
Nevertheless, Eclipse will give you a validation error for the camel-context.xml file if your xsi:schemaLocation attribute reads:
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".