I partially got cxf working in Eclipse RCP. I used the bundles from the
dosgi distribution and defined the necessary ones as required bundles.
My project compiles all right.
In the Activator class I got thecod below. When starting the App the
client-applicationContext.xml is loaded but then it can“t find the
cxf.xml. I guess the resource is not visible. Any idea how I make it
available?
Greetings
Christian
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
OsgiBundleXmlApplicationContext ccontext = new
OsgiBundleXmlApplicationContext(
new String[] {
"classpath:client-applicationContext.xml" });
ccontext.setBundleContext(context);
ccontext.refresh();
CustomerService client = (CustomerService)
ccontext.getBean("customerService");
List<Customer> resp = client.getCustomersByName("name");
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:customer="http://customerservice.example.com/"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.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" />
<jaxws:client id="customerService"
serviceName="customer:CustomerServiceService"
endpointName="customer:CustomerServiceEndpoint"
address="http://localhost:9090/CustomerServicePort"
serviceClass="com.example.customerservice.CustomerService">
</jaxws:client>
</beans>
Sergey Beryozkin schrieb:
Hi
You might want to have a look at the DOSGi RI multi-bundle
distribution...
Probably the only two bundles included in that distruibution which
CXF does not depend upon are CXF DSW (DOSGi distribution software
component) plus a Zoo-Keeper based Discovery bundle. All other bundles
are osgi-fied jars which are needed to resolve CXF
bundle dependencies. Not sure if it can help, but may be you can just
use those bundles in your project ...
cheers, Sergey
Thanks already for the many pointers. This seems quite time consuming
though. I guess the main problem is that the cxf jars define many
dependencies that are not osgi enabled. So if I understand this
correctly I have to configure all dependencies by hand and exclude
all the current non-osgi dependencies. Though I understand that
changing this situation is not really easy.
As I had no success till now I will try to simply embed the non osgi
cxf in a service client bundle and re export my service as an osgi
service. So at least my GUI project will not have to embed all the
non osgi jars. This solution is far from optimal but I think easier
to acomplish than the above.
Greetings
Christian
--
Christian Schneider
---
http://www.liquid-reality.de
--
Christian Schneider
---
http://www.liquid-reality.de