You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christoph Burmeister <ch...@googlemail.com> on 2011/09/09 17:03:50 UTC
camel+cxf: Unable to locate Spring NamespaceHandler for XML schema
namespace [http://camel.apache.org/schema/cxf]
Hi folks,
All help is appreciated. We're running Apache Camel (2.7.0) inside
Apache ActiveMQ (5.5) and all works well. So now we got new
requirements for exposing a webservice based on Camel.
When trying out the cxf-endpoint, we are facing a stupid error "Unable
to locate Spring NamespaceHandler for XML schema namespace
[http://camel.apache.org/schema/cxf]" and maybe you can give us a
little help.
the camel.xml :
-------------------
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd ">
<bean
id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616"/>
</bean>
<cxf:cxfEndpoint
id="orderEntryEndpoint"
address="http://0.0.0.0:8080/"
serviceClass="foo.bar.ServiceImpl"
/>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<route id="route4cxf">
<from uri="cxf:bean:cxfReceiver?dataFormat=PAYLOAD"/>
<log message="fetching message from cxf-endpoint" loggingLevel="INFO"/>
<to
uri="activemq:queue:receivedHttpMessages?disableReplyTo=true" />
</route>
</camelContext>
</beans>
---------------------
We already placed camel-cxf-2.7.0.jar and camel-core-2.7.0.jar to the
ActiveMQ-lib-directory. And the small camel.xml is really all, so we
cannot figure out, what (or better : where) the problem is. Could you
give us advice?
best,
christoph
Re: camel+cxf: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://camel.apache.org/schema/cxf]
Posted by Christoph Burmeister <ch...@googlemail.com>.
Hi Claus & Freeman,
many thanks for your fast replies. Actually I forgot to copy several
dependency-jars of cxf. Adding these jars, brought the camel up and
running :-)
For all, who run into the same problem: "
http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/lib/WHICH_JARS
" That's the file with all referenced jars. Or you simply download the
zipped cxf and have a look into the lib-directory...
In my case I had to add following jars to activemq's lib-directory:
- cxf.jar
- xmlschema-core.jar
- neethi.jar
- wsdl4j.jar
- jsr311-api.jar
best,
christoph
Re: camel+cxf: Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/cxf]
Posted by Freeman Fang <fr...@gmail.com>.
On 2011-9-9, at 下午11:03, Christoph Burmeister wrote:
> Hi folks,
>
> All help is appreciated. We're running Apache Camel (2.7.0) inside
> Apache ActiveMQ (5.5) and all works well. So now we got new
> requirements for exposing a webservice based on Camel.
> When trying out the cxf-endpoint, we are facing a stupid error "Unable
> to locate Spring NamespaceHandler for XML schema namespace
> [http://camel.apache.org/schema/cxf]" and maybe you can give us a
> little help.
>
> the camel.xml :
>
> -------------------
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf
Hi,
Change
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf
to
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
this should work.
Freeman
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd ">
>
> <bean
> id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
>
>
> <cxf:cxfEndpoint
> id="orderEntryEndpoint"
> address="http://0.0.0.0:8080/"
> serviceClass="foo.bar.ServiceImpl"
> />
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/
> spring">
>
> <route id="route4cxf">
> <from uri="cxf:bean:cxfReceiver?dataFormat=PAYLOAD"/>
> <log message="fetching message from cxf-endpoint"
> loggingLevel="INFO"/>
> <to
> uri="activemq:queue:receivedHttpMessages?disableReplyTo=true" />
> </route>
>
> </camelContext>
>
> </beans>
>
> ---------------------
>
> We already placed camel-cxf-2.7.0.jar and camel-core-2.7.0.jar to the
> ActiveMQ-lib-directory. And the small camel.xml is really all, so we
> cannot figure out, what (or better : where) the problem is. Could you
> give us advice?
>
> best,
> christoph
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: camel+cxf: Unable to locate Spring NamespaceHandler for XML
schema namespace [http://camel.apache.org/schema/cxf]
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Sep 9, 2011 at 5:03 PM, Christoph Burmeister
<ch...@googlemail.com> wrote:
> Hi folks,
>
> All help is appreciated. We're running Apache Camel (2.7.0) inside
> Apache ActiveMQ (5.5) and all works well. So now we got new
> requirements for exposing a webservice based on Camel.
> When trying out the cxf-endpoint, we are facing a stupid error "Unable
> to locate Spring NamespaceHandler for XML schema namespace
> [http://camel.apache.org/schema/cxf]" and maybe you can give us a
> little help.
>
> the camel.xml :
>
> -------------------
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxf="http://camel.apache.org/schema/cxf"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf
> http://camel.apache.org/schema/spring
> http://camel.apache.org/schema/spring/camel-spring.xsd ">
>
> <bean
> id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
> <property name="brokerURL" value="tcp://localhost:61616"/>
> </bean>
>
>
> <cxf:cxfEndpoint
> id="orderEntryEndpoint"
> address="http://0.0.0.0:8080/"
> serviceClass="foo.bar.ServiceImpl"
> />
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>
> <route id="route4cxf">
> <from uri="cxf:bean:cxfReceiver?dataFormat=PAYLOAD"/>
> <log message="fetching message from cxf-endpoint" loggingLevel="INFO"/>
> <to
> uri="activemq:queue:receivedHttpMessages?disableReplyTo=true" />
> </route>
>
> </camelContext>
>
> </beans>
>
> ---------------------
>
> We already placed camel-cxf-2.7.0.jar and camel-core-2.7.0.jar to the
> ActiveMQ-lib-directory. And the small camel.xml is really all, so we
> cannot figure out, what (or better : where) the problem is. Could you
> give us advice?
>
Ah you need a lot more JARs as Apache CXF itself requires many JARs to run.
The Apache CXF distribution has a .txt file named whichjars or
something like that, that tells which JARs you need.
> best,
> christoph
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/