I need to call an external webservice from my bundle which is deployed in
apache felix container ( I can not use ServiceMix, fuse...) I added the
bundle cxf-dosgi and put the following lines in my pom.xml:

                   
<Require-Bundle>cxf-dosgi-ri-singlebundle-distribution</Require-Bundle>
                     <Import-Package>
                        javax.jws,
                        javax.xml.bind,
                        javax.xml.bind.annotation,
                        javax.xml.namespace,
                        javax.xml.ws,
                        META-INF.cxf,
                        org.apache.cxf,
                        org.apache.cxf.binding,
                        org.apache.cxf.binding.soap,
                        org.apache.cxf.binding.soap.spring,
                        org.apache.cxf.bus,
                        org.apache.cxf.bus.resource,
                        org.apache.cxf.bus.spring,
                        org.apache.cxf.buslifecycle,
                        org.apache.cxf.catalog,
                        org.apache.cxf.configuration,
                        org.apache.cxf.configuration.spring,
                        org.apache.cxf.endpoint,
                        org.apache.cxf.headers,
                        org.apache.cxf.management,
                        org.apache.cxf.phase,
                        org.apache.cxf.resource,
                        org.apache.cxf.transport,
                        org.apache.cxf.transport.http,
                        org.apache.cxf.transport.http.policy,
                        org.apache.cxf.transport.http_jetty,
                        org.apache.cxf.transports.http,
                        org.apache.cxf.workqueue,
                        org.apache.cxf.ws.policy.builder.jaxb,
                        org.apache.cxf.wsdl,
                        org.apache.cxf.wsdl11,
                        org.apache.cxf.jaxws.*,
                        *
                    </Import-Package>

I use the jaxws way to establish the communication:

QName SERVICE_NAME = new QName("http://test.com/";, "MockImplService");
Service service = Service.create(new URL(endpointAddress + "?wsdl"),
SERVICE_NAME);        
mockService= service.getPort(IMock.class);                                      
          

When I run the example I have the following exception:

 Caused by: javax.xml.ws.spi.FactoryFinder$ConfigurationError: Provider
org.apache.axis2.jaxws.spi.Provider not found
        at javax.xml.ws.spi.FactoryFinder$2.run(FactoryFinder.java:138)
        at
javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:282)
        at
javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:125)
        at javax.xml.ws.spi.FactoryFinder.access$200(FactoryFinder.java:42)
        at javax.xml.ws.spi.FactoryFinder$3.run(FactoryFinder.java:273)
        at
javax.xml.ws.spi.FactoryFinder.doPrivileged(FactoryFinder.java:282)
        at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:168)
        at javax.xml.ws.spi.Provider.provider(Provider.java:39)
        at javax.xml.ws.Service.<init>(Service.java:36)
        at javax.xml.ws.Service.create(Service.java:116)

any idea please ? 



--
View this message in context: 
http://apache-felix.18485.n6.nabble.com/How-to-make-an-OSGi-bundle-call-external-Web-service-tp5002125.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to