CXF DOSGi 1.4
mcr701 Mar 22, 2013 8:01 AMHi,
I've been working for few days to get CXF D-OSGi 1.4 working on my JBoss 7.1.1.Final and I finally managed to get
it working. To some extent.
I have attached my OSGi subsystem configuration for reference.
With that configuration I have been able to create a HelloWorldService with this blueprint
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
<bean id="hello-service" class="hello.service.HelloServiceImpl" activation="eager"/>
<service ref="hello-service" interface="hello.api.HelloService">
<service-properties>
<entry key="service.exported.interfaces" value="*" />
<entry key="service.exported.configs" value="org.apache.cxf.ws" />
<!-- <entry key="org.apache.cxf.ws.httpservice.context" value="/hello/service" /> -->
<entry key="org.apache.cxf.ws.address" value="http://localhost:9000/hello/service" />
</service-properties>
</service>
</blueprint>
With my client, I can make calls just fine.
But, If I remove 'org.apache.cxf.ws.address' and replace it with 'org.apache.cxf.ws.httpservice.context' above,
My service gets registered just fine, but data in ZooKeeper is incorrect. For the port part. No matter what I do, my URL in zookeeper node
points to port 8181.
In previous version of DOSGi, port number was controlled with
<socket-binding name="osgi-http" interface="public" port="8099" />
And it worked just fine. But 1.4 version does not work like it used to.
This seems to be a bug in CXF DOSGi. Or a feature. I have been able to change the port with either (don't remember which one, or both)
cxf-dsw.cfg:
httpBase=http://localhost:8099
cxfServletAlias=/cxf
or org.ops4j.pax.web.cfg:
org.osgi.service.http.port=8099
With these configurations, my HelloService responds in port 8099, but data in ZooKeeper node remains 8181 !!!!!
Anyone experiencing the same? Ideas?
In my osgi subsystem config, I'm using old pax-web stuff, because if I try to use the new one, it works but there are some strange
errors in log files. NoSuchMethodError on LazyList...
-
jboss-osgi-subsystem.txt.zip 1.3 KB