Ok for your requirement here is what you need to do.Create a jax-ws endpoint
and drop into META-INF/spring.

Create  a file named whatever sensible in xml format.For demo lets assume
the name is beans.xml.The contents of beans.xml would be

<beans xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
"><import resource="classpath:META-INF/cxf/cxf.xml"/><import
resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><import
resource="classpath:META-INF/cxf/cxf-extension-http.xml"/><import
resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml"/>

<jaxws:endpoint id=&quot;&lt;EndpointName>" implementor="<ImplementorClass>"
address="<Address>"/>

</beans>

This file will be in path
<YourWebServiceProject>/src/main/resources/META-INF/spring.(or path where
your camel context is.I am assuming your are using Spring-DM to load to your
modules.).Remove the camel-context.

This is enough to expose the webservice in FUSE ESB/SERVICEMIX.What you are
trying to do is cxf proxy i guess.It receives the request from client and
sends the payload to backing bean.

What this will do is expose your webservice.So from soapUI if you hit a
method greet in GreetServiceImpl(assume this is the method you have exposed
and you are trying to hit) ,the implementation method greet will be called.

Now to second part  what if you want to hit call me in greetProcessor after
first hitting greet in GreetServiceImpl

the  my code would be

pubic void greet(String request)
{
       //create a producer template to send it to proper Queue.refer
documentation for exact way this is just a guidance.
      CamelProducertemplate.send("jms:testQ",request) //drop it in 
seda/jms/vm queue named testQ

 
 
}

then in camel context you have a route 

 <route>
        <from uri="jms:testQ"/>
        <bean method="callMe" ref="greetProcessor"/>
    </route>
 what happens here the webservice receives a call and drops it to a queue
.from q camel picks up the request and calls the bean

So you will have a camel context (now u dont require beans.xml) like

<beans xsi:schemaLocation=" http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
"><import resource="classpath:META-INF/cxf/cxf.xml"/><import
resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/><import
resource="classpath:META-INF/cxf/cxf-extension-http.xml"/><import
resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml"/>

<jaxws:endpoint id=&quot;&lt;EndpointName>" implementor="<ImplementorClass>"
address="<Address>"/>

<camelContext trace="false" xmlns="http://camel.apache.org/schema/spring";>

    <route>
        <from uri="jms:testQ"/>
        <bean method="callMe" ref="greetProcessor"/>
    </route>
</camelContext>

</beans>

*Please add camel namespaces to above xml. you will also face import
constraints if you dont have needed bundles on your SMX due to the import
resources statements .*

If you want to just expose the service alone i dont think you need camel. 




--
View this message in context: 
http://camel.465427.n5.nabble.com/CXF-Service-Implementer-could-not-be-invoked-tp5723907p5723984.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to