That's because your template isn't injected with a producerTemplate, as the impl instance is created by CXF not by Spring.

Can you change the spring configure like this ?


 <jaxws:endpoint id="helloWorld"
  implementor="#myImpl"
  address="/HelloWorld" />

<bean id="myImpl" class="org.apache.servicemix.examples.cxf.HelloWorldImpl" />

...

Willem


On 9/20/10 8:19 AM, xiaotao183 wrote:

Hi Claus,

Webservice is not part of the route. What I want to achieve is when the
webservice is invoked a message should be produced and sent to an endpoint
(in this case direct:start is the endpoint).

I tested my code using a web client and the NPE was thrown in the line of
calling the template.sendBody("hello world").



Reply via email to