I have CXF/SOAP services deployed within OSGi enRoute, and can successfully connect via SoapUI. Next is to build a simple OSGi gogo command to invoke these services, then migrate this to Liferay for end-to-end demo.
To this end, am using the following for guidance (but disregarding Liferay components until the shell command works): http://www.dontesta.it/blog/blog-2/liferay-7-come-realizzare-un-client-soap-apache-cxf-osgi-style/ The instructions given above state I would need the following runtime bundles with my OSGi Command Line Tools bundle: • Apache XmlSchema Core (v. 2.2.1) • Apache CXF Core • Apache CXF Runtime JAXB DataBinding • Apache CXF Runtime XML Binding • Apache CXF Runtime SOAP Binding • Apache CXF Runtime Core for WSDL • Apache CXF Runtime Simple Frontend • Apache CXF Runtime JAX-WS Frontend • Apache CXF Runtime HTTP Transport It seems quite straightforward, but am getting the following exception when running the OSGi gogo command: interface com.sun.xml.internal.ws.developer.WSBindingProvider is not visible from class loader My gogo command code appears as follows: @Component(service = InvolvedPartyFetchCommand.class, property = { Debug.COMMAND_SCOPE + "=party", Debug.COMMAND_FUNCTION + "=fetch" }) public class InvolvedPartyFetchCommand { public void fetch() { try { InvolvedPartyService service = new InvolvedPartyService(InvolvedPartyService.WSDL_LOCATION, InvolvedPartyService.SERVICE); InvolvedPartyPortType port = service.getInvolvedPartySoap12Endpoint(); System.out.println("Invoking involvedPartyFetch..."); InvolvedPartyFetchRequest request = new InvolvedPartyFetchRequest(); InvolvedPartyFetchResponse response = port.involvedPartyFetch(request); System.out.println("involvedPartyFetch.result=" + response); } catch (Throwable e) { e.printStackTrace(); } } } And my bndrun file for the OSGi command project is as follows: # # LAUNCH SPECIFICATION # Bundle-Version: 1.0.0.${tstamp} Bundle-SymbolicName: com.rps.masterdata.party.soapClient.launch JPM-Command: sopclnt -runrequires: \ osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-core)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-bindings-soap)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-bindings-xml)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-databinding-jaxb)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-frontend-simple)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-frontend-jaxws)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-transports-http)',\ osgi.identity;filter:='(osgi.identity=org.apache.cxf.cxf-rt-wsdl)',\ osgi.identity;filter:='(osgi.identity=org.apache.ws.xmlschema.core)',\ osgi.identity;filter:='(osgi.identity=com.rps.masterdata.party.soapClient.provider)',\ osgi.identity;filter:='(osgi.identity=com.rps.masterdata.party.soapClient.command)' -runbundles: \ com.rps.foundation.soapClient.provider;version=snapshot,\ com.rps.masterdata.party.soapClient.command;version=snapshot,\ com.rps.masterdata.party.soapClient.provider;version=snapshot,\ org.apache.cxf.cxf-core;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-bindings-soap;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-bindings-xml;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-databinding-jaxb;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-frontend-jaxws;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-frontend-simple;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-transports-http;version='[3.1.6,3.1.7)',\ org.apache.cxf.cxf-rt-wsdl;version='[3.1.6,3.1.7)',\ org.apache.felix.configadmin;version='[1.8.6,1.8.7)',\ org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\ org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)',\ org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\ org.apache.felix.log;version='[1.0.1,1.0.2)',\ org.apache.felix.scr;version='[2.0.0,2.0.1)',\ org.apache.servicemix.bundles.wsdl4j;version='[1.6.3,1.6.4)',\ org.apache.ws.xmlschema.core;version='[2.2.1,2.2.2)',\ org.eclipse.equinox.metatype;version='[1.4.100,1.4.101)',\ org.osgi.service.metatype;version='[1.3.0,1.3.1)' I've seen a number of posts on this issue, but I have such a vanilla setup that solutions provided elsewhere don't seem applicable here. Suggestions are certainly appreciated. Thanks, Randy
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev