On Wednesday 15 December 2010 4:51:09 am Markus wrote:
> after I am finally able to run CFX in OSGi, I am trying hard to use
> spring-dm within this context. 

Interesting timing on this question from my standpoint considering I just 
spent the last several weeks (or more) working on this.


........

>       <jaxws:endpoint id="CusomterService"
> 
> implementor="com.example.customerservice.CustomerServiceImpl"
>                       address="/CustomerServicePort" />

There is a bug in the HTTP OSGi transport  (CXF-3183) in 2.3.x where you would 
likely need to add a transportId to this, but you are using 2.2.9.  


> 
> </beans>
> 
> My tryings are base on http://lukaszbaran.com/blog/?p=8, so I do not have
> any web.xml to set up the servlet at all.
> 
> I have the following bundles in my OSGi-Container:
> Framework is launched.
> 
> id      State       Bundle
> 0       ACTIVE      org.eclipse.osgi_3.6.0.v20100517
> 1       ACTIVE      org.mortbay.jetty.javax.servlet_5.1.12
> 2       ACTIVE      org.eclipse.equinox.common_3.3.0.v20070426
> 3       ACTIVE      org.eclipse.osgi.services_3.2.100.v20100503
> 4       ACTIVE      org.eclipse.osgi.util_3.2.100.v20100503
> 5       ACTIVE      org.apache.servicemix.specs.jaxb-api-2.1_1.3.0
> 6       ACTIVE      org.apache.servicemix.bundles.jaxb-impl_2.1.6.1
> 7       ACTIVE      org.apache.servicemix.specs.stax-api-1.0_1.3.0
> 8       ACTIVE
> org.apache.geronimo.specs.geronimo-activation_1.1_spec_1.0.2
> 9       ACTIVE      com.springsource.slf4j.org.apache.commons.logging_1.5.0
> 10      RESOLVED    com.springsource.slf4j.log4j_1.5.0
>                     Master=11
> 11      ACTIVE      com.springsource.slf4j.api_1.5.0
>                     Fragments=10
> 12      ACTIVE      org.springframework.osgi.log4j.osgi_1.2.15.SNAPSHOT
>                     Fragments=36
> 13      ACTIVE      org.apache.servicemix.bundles.aopalliance-1.0_1.0.0.rc1
> 14      ACTIVE      org.springframework.core_2.5.6.SEC01
> 15      ACTIVE      org.springframework.beans_2.5.6.SEC01
> 16      ACTIVE      org.springframework.context_2.5.6.SEC01
> 17      ACTIVE      org.springframework.aop_2.5.6.SEC01
> 18      ACTIVE      org.springframework.osgi.core_1.2.1
> 19      ACTIVE      org.springframework.osgi.extender_1.2.1
> 20      ACTIVE      org.springframework.osgi.io_1.2.1
> 21      ACTIVE      org.apache.servicemix.bundles.asm_2.2.3.1
> 22      ACTIVE      org.apache.servicemix.bundles.commons-pool_1.5.4.1
> 23      ACTIVE      org.apache.servicemix.bundles.neethi_2.0.4.1
> 24      ACTIVE      org.apache.servicemix.bundles.wsdl4j_1.6.1.1
> 25      ACTIVE      org.apache.servicemix.bundles.xmlresolver_1.2.0.1
> 26      ACTIVE      org.apache.servicemix.bundles.xmlschema_1.4.3.1
> 27      ACTIVE      org.apache.servicemix.specs.jaxws-api-2.1_1.3.0
> 28      ACTIVE      org.apache.servicemix.specs.saaj-api-1.3_1.3.0
> 29      ACTIVE
> org.apache.geronimo.specs.geronimo-annotation_1.0_spec_1.1.1
> 30      ACTIVE
> org.apache.geronimo.specs.geronimo-javamail_1.4_spec_1.2.0
> 31      ACTIVE
> org.apache.geronimo.specs.geronimo-ws-metadata_2.0_spec_1.1.2
> 32      ACTIVE      cxf-rt-transports-http-osgi_2.2.9
> 33      ACTIVE      org.apache.cxf.bundle-minimal_2.2.9
> 34      ACTIVE      org.mortbay.jetty.server_6.1.9
> 35      ACTIVE      org.mortbay.jetty.util_6.1.9
> 36      RESOLVED    org.springframework.osgi.log4j.config_1.0.0.SNAPSHOT
>                     Master=12
> 37      ACTIVE      CustomerServiceServer_0.9.9.alpha


I don't see the PAX-Web related bundles in there that would be the stuff 
providing the underlying OSGi http service, I think.   That's likely the 
issue.    I'm surprised the CXF OSGi transport didn't throw an exception or 
something though.

> 
> As a side note, everythings works when I use the programmatic way with
> <bean name="activator" class="com.example.customerservice.osgi.Activator"
>         init-method="beanStart" destroy-method="beanStop" />
> 
> I guess that I miss some bundles or some kind of servlet
> definition/configuration/binding, but have no idea what and how.
> I would be very greatful for some help.

My SUGGESTION would be to grab the Talend Service Framework (released today, 
see my blog in my sig) and its OSGi based examples and go from there.   We 
made sure all the required third party deps are in place in the OSGi container 
and did quite a bit of testing to make sure the OSGi based examples "just 
work".  It may be a good starting point for you without needing to go all the 
way up to ServiceMix.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to