Hi Freeman, My CXF service is configured as below, which looks about like what you show in your message:
<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0"> <cxfse:endpoint> <cxfse:pojo> <bean class="org.apache.servicemix.samples.cxf_wsdl_first.PersonImpl" /> </cxfse:pojo> </cxfse:endpoint> </beans> My CXF service deploys just fine and for testing purposes, I can invoke it via simple JavaScript. Of course, what I'm really trying to do is invoke my CXF service from a POJO deployed to the lightweight container (servicemix-lwcontainer). From the code snippet you kindly sent me (CxfSeClientProxyTest.java), I gather I should do something like this inside my POJO: client = new DefaultServiceMixClient(container); io = client.createInOutExchange(); io.setService(new QName("http://apache.org/hello_world_soap_http", "SOAPService")); io.setInterfaceName(new QName("http://apache.org/hello_world_soap_http", "Greeter")); io.setOperation(new QName("http://apache.org/hello_world_soap_http", "greetMe")); Have I got it right? If so, a couple more questions: My POJO looks like this: public class LoanBroker extends ComponentSupport implements MessageExchangeListener and I'm having a hard time figuring out how to create a ServiceMixClient. I can't seem to get a JBI container reference and so the technique in your example won't work. Obviously, I'm still learning the API; how can I create a ServiceMixClient from a POJO extending ComponentSupport? While I intend to explore the ServiceMixClient approach, I'm wondering if I can't simply configure a CXF endpoint declaratively in my lightweight container configuration file (servicemix.xml) and inject it into my POJO. Is the "programmatic" ServiceMixClient approach the only way to go or can I configure a CXF endpoint reference? (Got an example for that?) Thanks again, Garry Freeman Fang wrote: > > Hi Garry, > > If you want to reference cxf web-service inside jbi container, you can > see how client proxy is used inside cxf-se. > the configuration is per as below > > <cxfse:endpoint> > <cxfse:pojo> > <bean > class="org.apache.servicemix.cxfse.GreeterImplForClientProxy" > autowire="false"> > <property name="calculator"> > <cxfse:proxy service="calculator:CalculatorService" > context="#context" type="org.apache.cxf.calculator.CalculatorPortType" /> > </property> > </bean> > </cxfse:pojo> > </cxfse:endpoint> > > And [1] is a test to illustrate how client proxy is used > [1] > http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/serviceengines/servicemix-cxf-se/src/test/java/org/apache/servicemix/cxfse/CxfSeClientProxyTest.java > > Best Regards > > Freeman > > Garry wrote: >> Hi, >> >> I'm learning ServiceMix and JBI and would like to modify the ESB >> LoanBroker >> example to call >> one of the web services configured in the cxf-wsdl-first example. I've >> looked around but >> can't find an explanation of how to reference the web-service endpoint. >> Can >> someone point >> me in the right direction? >> >> Thanks, Garry >> > > -- View this message in context: http://www.nabble.com/How-to-call-ws-endpoint-from-LoanBroker-tf4779904s12049.html#a13706794 Sent from the ServiceMix - User mailing list archive at Nabble.com.