Return-Path: Delivered-To: apmail-cxf-dev-archive@www.apache.org Received: (qmail 79003 invoked from network); 21 Apr 2009 13:22:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Apr 2009 13:22:25 -0000 Received: (qmail 89608 invoked by uid 500); 21 Apr 2009 13:22:25 -0000 Delivered-To: apmail-cxf-dev-archive@cxf.apache.org Received: (qmail 89535 invoked by uid 500); 21 Apr 2009 13:22:25 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Delivered-To: moderator for dev@cxf.apache.org Received: (qmail 70709 invoked by uid 99); 21 Apr 2009 11:09:09 -0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) MIME-Version: 1.0 From: Cameron Braid Date: Tue, 21 Apr 2009 21:08:22 +1000 Message-ID: <81bda5880904210408y24b75de8y2fe6ba341b58150c@mail.gmail.com> Subject: I've created an example of implementing a jaxws client using CXF for deployment into smx4 (servicemix4) To: users@cxf.apache.org, dev@cxf.apache.org Content-Type: multipart/alternative; boundary=001636e90dc3266d8d04680eab36 X-Virus-Checked: Checked by ClamAV on apache.org --001636e90dc3266d8d04680eab36 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I spent a few days wrestling with dependencies, incorrect samples, mis-information to try an work out how to implement a bundle that uses CXF, cxf-codegen-plugin's wsdl2java and the element in a spring beans.xml file. I have built two bundles which are hosted at http://cams-code.googlecode.com/svn/osgi/ One bundle implements the soap client (helloworldclient) the other (helloworldconsumer) uses a BundleActivator and a ServiceListener to trigger a soap call and print out some info. The helloworldclient uses a copy of the helloworld.wsdl file from the examples-cxf-osgi bundle. I don't have the time to type out a complete tutorial for this, so I will just quickly explain the steps to checkout / build, and deploy the code 1) checkout the cxf example client and consumer $ svn co http://cams-code.googlecode.com/svn/osgi/cameronbraid.examples.cxf.helloworldclient/ $ svn co http://cams-code.googlecode.com/svn/osgi/cameronbraid.examples.cxf.helloworldconsumer/ 2) build the bundles $ cd cameronbraid.examples.cxf.helloworldclient $ mvn install $ cd .. $ cd cameronbraid.examples.cxf.helloworldconsumer $ mvn install $ cd .. 3) setup servicemix 4 - download smx4 from http://servicemix.apache.org/SMX4/download.html and unzip 4) launch servicemix 4 and start the examples-cxf-osgi bundle $ bin/servicemix smx@root:/> features/install examples-cxf-osgi 5) test that the soap server has started open your browser to http://localhost:8080/cxf/HelloWorld?wsdl 6) install and start the helloworldclient bundle smx@root:/> osgi/install mvn:cameronbraid.examples/cxf.helloworldclient/1.0-SNAPSHOT Bundle ID: 160 smx@root:/> osgi/list | grep helloworldclient [ 160] [Resolved ] [ ] [ 60] cameronbraid.examples.cxf.helloworldclient (1.0.0.SNAPSHOT) smx@root:/> osgi/start 160 smx@root:/> osgi/list | grep helloworldclient [ 160] [Active ] [Started] [ 60] cameronbraid.examples.cxf.helloworldclient (1.0.0.SNAPSHOT) 7) install and start the helloworldconsumer bundle smx@root:/> osgi/install mvn:cameronbraid.examples/cxf.helloworldconsumer/1.0-SNAPSHOT Bundle ID: 161 smx@root:/> osgi/list | grep helloworldconsumer [ 161] [Resolved ] [ ] [ 60] cameronbraid.examples/cxf.helloworldconsumer (1.0.0.SNAPSHOT) smx@root:/> osgi/start 161 serviceReference = [cameronbraid.examples.cxf.helloworldclient.HelloWorld] service = org.apache.cxf.jaxws.JaxWsClientProxy@117a0daa sayHiResponse = cameronbraid.examples.cxf.helloworldclient.types.SayHiResponse@38476a1d sayHiResponse.return = Hello cxf osgi Cheers Cameron --001636e90dc3266d8d04680eab36--