You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Lídio Toledo <li...@hotmail.com> on 2014/03/25 18:29:54 UTC
Problems creating a Web Service with camel-cxf
Hello,
I am trying to create a simple Web Service example (using the Camel in Action as a resource) but when I start my application with maven jetty:run a keep receiving errors when I try to test the service with Eclipse's Web Services Explorer.
I need to create a Webservice with many operations using the top-down approach. In order to do so, I created a project using the archetype "org.apache.camel.archetypes:camel-archetype-web". Created a new wsdl using the wizard from eclipse and mapped the following in my ApplicationContext.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<cxf:cxfEndpoint id="wsdlEndpoint" address="http://localhost:9090/NewWSDLFile/"
serviceClass="org.example.newwsdlfile.NewWSDLFile" wsdlURL="/WEB-INF/wsdl/NewWSDLFile.wsdl" />
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:wsdlEndpoint" />
<to uri="log:org.example.newwsdlfile.newwsdl?level=DEBUG"/>
<transform>
<constant>OK</constant>
</transform>
</route>
</camelContext>
</beans>
I am including the sources used in this example in this message. Any clues to what I am missing?
Any help, or working example will be highly appreciated!
Regards,
Lídio