Hi,

How do you deploy your project (war in tomcat, ...) ? Which version of CXF
are you using ? Which cxf xml files do you import ? Are you using the Jetty
HTTP server to register the web service or tomcat ?

I think that your issue is described here :

http://cxf.547215.n5.nabble.com/address-in-spring-bean-definition-td567912.html
http://stackoverflow.com/questions/3793034/web-service-using-cxf-jetty-and-spring

Regards,


On Wed, Aug 29, 2012 at 8:45 AM, cmland <qiancheng...@gmail.com> wrote:

> my route config:
>         <camelContext id="myContext" xmlns="
> http://camel.apache.org/schema/spring";
> >
>                         <route>
>                              <from uri="cxf:bean:helloService"></from>
>                              <to uri="mock:end"></to>
>                         </route>
>         </camelContext>
> my cxf config:
>         <cxf:cxfEndpoint id="helloService" address="/addOrder"
>                 serviceClass="com.xxx.IOrderService">
>         </cxf:cxfEndpoint>
> when the route work in a web container,  i want to  send message  to uri
> (cxf:bean:helloService) with producerTemplate,but it's not work and throws
> :
>           java.net.MalformedURLException: no protocol: /addOrder
>
>
> code like this: (springContext is XmlWebApplicationContext)
>       CamelContext camelContext =
> (CamelContext)springContext.getBean("myContext");
>       ProducerTemplate   template =  camelContext.createProducerTemplate();
>       Exchange exchange = new DefaultExchange(camelContext);
>       exchange.getIn().setBody("message");
>       template.send("cxf:bean:helloService",exchange);
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/how-can-i-send-message-to-cxf-component-with-producerTemplate-tp5718227.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Twitter : @cmoulliard
Blog : http://cmoulliard.blogspot.com

Reply via email to