4 Replies Latest reply on Apr 14, 2009 5:55 AM by Claus Ibsen

    Camel XML Schema URL problem

    Weston Bustraan Newbie

      I'm running into some problems when using Camel schemas within a Spring config file.

       

      First off, let me describe my network situation. I'm behind an authenticated HTTP proxy, so in order to reach the internet, I must supply a valid username and password. When I'm developing in Eclipse, it's able to get through, but when I run the ServiceMix daemon, it cannot.

       

      Apparently, the Apache project recently changed the URL for their camel-spring schema when Camel became a toplevel project.

       

      It used to be:

      http://activemq.apache.org/camel/schema/spring/camel-spring.xsd

       

      But that URL now redirects to:

      http://camel.apache.org/schema/spring/camel-spring.xsd

       

      The problem with this is that the namespace has changed also. So, in Eclipse, if you specify the old namespace:

       

      xsi:schemaLocation="

      http://activemq.apache.org/camel/schema/spring

      http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"

       

      ... it throws an error because the document that is retrieved has the following schema:

       

      http://camel.apache.org/schema/spring

       

      It would seem like the easiest solution would be to just update everything to the camel.apache.org schemas.

       

      I tried this, but I can't deploy bundles with the new namespace. Remember that my ServiceMix install cannot reach the Internet to retrieve .xsd files. This wasn't a problem before because the appropriate .xsd file is included in ServiceMix and it found it locally. The problem is that Fuse ESB 4 contains Camel 1.5 which includes a camel-spring.xsd for the activemq.apache.org namespace.

       

      So, I'm in a catch-22 situation. If I use the new namespace, Eclipse is happy but ServiceMix gives the following error:

       

      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camel:camelContext'.

       

      If I use the old namespace, ServiceMix is happy, but the Eclipse won't validate my XML files and gives the same error.

       

      I see two possible resolutions, but they seem to be both out of my control:

       

      1) Somehow get the folks at apache.org to remove the redirect and have http://activemq.apache.org/camel/schema/spring/camel-spring.xsd point to a .xsd file whose namespace matches the url.

       

      2) Get the new camel.apache.org namespace included in a new release of FUSE ESB 4.

       

      Any other suggestions?