You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Markus <zo...@web.de> on 2010/12/15 10:51:09 UTC
Web Service in OSGi with spring-dm
Hello,
after I am finally able to run CFX in OSGi, I am trying hard to use
spring-dm within this context. Everything seems to be fine (according to the
logging output) but there is no web service on any port (veryfied with NMap;
firewall disabled).
This ist my META-INF/spring/beans.xml:
<?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:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd">
<!--bean name="activator"
class="com.example.customerservice.osgi.Activator"
init-method="beanStart" destroy-method="beanStop" /-->
<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" />
<import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
<jaxws:endpoint id="CusomterService"
implementor="com.example.customerservice.CustomerServiceImpl"
address="/CustomerServicePort" />
</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
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.
Best Regards,
Markus
--
View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3306001.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Web Service in OSGi with spring-dm
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
A couple of questions
Seems you're using http-osgi transport, did you deploy this bundle in
servicemix 4.x? If so, which exact servicemix version you're using?
Which default http-osgi service listening port you're using?
Which url you tried to access the webservice? It should be http://localhost
:http_osgi_service_listening_port/cxf/CustomerServicePort
What the class com.example.customerservice.osgi.Activator do?
Btw, you may need take a look at cxf-osgi example shipped with Apache
Servicemix 4.2.0 kit, it publish a cxf service over http-osgi
transport using spring-dm, which is exactly same as your scenario.
Freeman
On 2010-12-15, at 下午5:51, Markus wrote:
>
> Hello,
>
> after I am finally able to run CFX in OSGi, I am trying hard to use
> spring-dm within this context. Everything seems to be fine
> (according to the
> logging output) but there is no web service on any port (veryfied
> with NMap;
> firewall disabled).
>
> This ist my META-INF/spring/beans.xml:
> <?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:jaxws="http://cxf.apache.org/jaxws"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws
> http://cxf.apache.org/schemas/jaxws.xsd">
>
> <!--bean name="activator"
> class="com.example.customerservice.osgi.Activator"
> init-method="beanStart" destroy-method="beanStop" /-->
>
> <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" />
> <import resource="classpath:META-INF/cxf/osgi/cxf-extension-
> osgi.xml" />
>
> <jaxws:endpoint id="CusomterService"
>
> implementor="com.example.customerservice.CustomerServiceImpl"
> address="/CustomerServicePort" />
>
> </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
>
> 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.
>
> Best Regards,
> Markus
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3306001.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org
Re: Web Service in OSGi with spring-dm
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
My comment inline
On 2010-12-15, at 下午7:26, Markus wrote:
>
> Hi Freeman, hi David ,
>
> yes, I try to use the http-osgi transport. The bundle is deployed:
> 32 ACTIVE cxf-rt-transports-http-osgi_2.2.9
>
> But I am not using servicemix at all. Maby I am wrong, but I thought
> that
> using an Enterprise Service Bus is not necessary. I will have some
> business
> logic which I would like to modularize based on OSGi. This software
> must be
> usable from a remote web portal. Therefore, I would like to build
> the web
> service frontend from a given WSDL with CXF. I thought that a simple
> OSGi
> container is sufficient for this purpose, so I am using Eclipse
> Equinox 3.6
> at the moment (but maby I am wrong with this, so I am open for
> suggestions).
Just a quick note.
Servicemix provide lots of pre-installed bundle/features which is very
convenient for you to use cxf/camel/activemq/JBI inside OSGi container.
And Servicemix team make great effort to verify those bundles can work
together, this can save you a big time as you needn't do it from
scratch.
>
> I set the org.osgi.service.http.port to 8080, whichis also given in
> the WSDL
> and as far as I know the default for OSGi.
> I tried to access the webservice with
> http://localhost:8080/cxf/CustomerServicePort?wsdl and
you should use http://localhost:8080/cxf/CustomerServicePort?wsdl
this url is the way for cxf http-osgi transport works
> http://localhost:8080/CustomerServicePort?wsdl. But the port 8080
> and is not
> opend. According to a port scan with NMap, there is no open port and
> no web
> service available (search was not limited to 8080).
>
Port 8080 isn't up means the undlerly OSGi http service isn't up, OSGi
http service is OSGi core service per OSGi spec, there're several OSGi
http service implementations available, pax-web is the one we
generally use.
You need install several bundles to start OSGi http service
org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2
org.apache.servicemix.bundles/org.apache.servicemix.bundles.jetty-
bundle/6.1.22_1
org.ops4j.pax.web/pax-web-api/0.7.3
org.ops4j.pax.web/pax-web-spi/0.7.3
org.ops4j.pax.web/pax-web-runtime/0.7.3
org.ops4j.pax.web/pax-web-jetty/0.7.3
In servicemix you can use "features:install http" to install all of
those bundle, actually it's default feature for servicemix, so by
default there's a OSGi http service up for you to use :-) .
> com.example.customerservice.osgi.Activator simple publishes the
> service:
> Object implementor = new CustomerServiceImpl();
> String address = "http://localhost:8080/CustomerServicePort";
> Endpoint.publish(address, implementor);
> CustomerServiceImpl is the implementation generated by CXF with some
> simple
> code added for testing.
>
Ok, this Activator class actually publish cxf service over http
transport, but not the http-osgi transport, that's why it success
without OSGi http service up.
Hope all this helps.
Freeman
> The spring-dm demo from CXF-DOSGi is not exactly what I am trying to
> do (or
> at least I think so). I build a web service from a given WSDL with
> CXF. And
> now I would like to run this web service (not OSGi service) within
> OSGi. I
> have not investigated whether CXF-DOSGi is an alternative for my
> purpose,
> but I will give it a try.
>
> Best Regards,
> Markus
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3306115.html
> Sent from the cxf-user mailing list archive at Nabble.com.
--
Freeman Fang
------------------------
FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org
Re: Web Service in OSGi with spring-dm
Posted by Markus <zo...@web.de>.
Hi Freeman, hi David ,
yes, I try to use the http-osgi transport. The bundle is deployed:
32 ACTIVE cxf-rt-transports-http-osgi_2.2.9
But I am not using servicemix at all. Maby I am wrong, but I thought that
using an Enterprise Service Bus is not necessary. I will have some business
logic which I would like to modularize based on OSGi. This software must be
usable from a remote web portal. Therefore, I would like to build the web
service frontend from a given WSDL with CXF. I thought that a simple OSGi
container is sufficient for this purpose, so I am using Eclipse Equinox 3.6
at the moment (but maby I am wrong with this, so I am open for suggestions).
I set the org.osgi.service.http.port to 8080, whichis also given in the WSDL
and as far as I know the default for OSGi.
I tried to access the webservice with
http://localhost:8080/cxf/CustomerServicePort?wsdl and
http://localhost:8080/CustomerServicePort?wsdl. But the port 8080 and is not
opend. According to a port scan with NMap, there is no open port and no web
service available (search was not limited to 8080).
com.example.customerservice.osgi.Activator simple publishes the service:
Object implementor = new CustomerServiceImpl();
String address = "http://localhost:8080/CustomerServicePort";
Endpoint.publish(address, implementor);
CustomerServiceImpl is the implementation generated by CXF with some simple
code added for testing.
The spring-dm demo from CXF-DOSGi is not exactly what I am trying to do (or
at least I think so). I build a web service from a given WSDL with CXF. And
now I would like to run this web service (not OSGi service) within OSGi. I
have not investigated whether CXF-DOSGi is an alternative for my purpose,
but I will give it a try.
Best Regards,
Markus
--
View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3306115.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Web Service in OSGi with spring-dm
Posted by David Bosschaert <da...@gmail.com>.
Hi Markus,
You may want to try out the CXF-DOSGi subproject, which comes with a
spring-dm demo. See here: http://cxf.apache.org/distributed-osgi.html
Best regards,
David
On 15 December 2010 09:51, Markus <zo...@web.de> wrote:
>
> Hello,
>
> after I am finally able to run CFX in OSGi, I am trying hard to use
> spring-dm within this context. Everything seems to be fine (according to the
> logging output) but there is no web service on any port (veryfied with NMap;
> firewall disabled).
>
> This ist my META-INF/spring/beans.xml:
> <?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:jaxws="http://cxf.apache.org/jaxws"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://cxf.apache.org/jaxws
> http://cxf.apache.org/schemas/jaxws.xsd">
>
> <!--bean name="activator"
> class="com.example.customerservice.osgi.Activator"
> init-method="beanStart" destroy-method="beanStop" /-->
>
> <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" />
> <import resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />
>
> <jaxws:endpoint id="CusomterService"
>
> implementor="com.example.customerservice.CustomerServiceImpl"
> address="/CustomerServicePort" />
>
> </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
>
> 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.
>
> Best Regards,
> Markus
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3306001.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: Web Service in OSGi with spring-dm
Posted by Markus <zo...@web.de>.
Hello Daniel,
it works with the packages mentioned by you.
Thank you very much.
Best Regards,
Markus
Daniel Kulp wrote:
>
> Can you also try adding
> org.ops4j.pax.web/pax-web-jsp
> org.ops4j.pax.web/pax-web-extender-war
> org.ops4j.pax.web/pax-web-extender-whiteboard
> org.ops4j.pax.url/pax-url-war
>
--
View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3309212.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Web Service in OSGi with spring-dm
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 16 December 2010 12:58:11 pm Markus wrote:
> Hello Freeman, hello Daniel,
>
> thanks a lot for your help.
>
> I added a lot of bundles to my containter:
> 35 ACTIVE org.eclipse.jetty.io_7.2.2.v20101205
> 36 ACTIVE org.eclipse.jetty.http_7.2.2.v20101205
> 37 ACTIVE org.eclipse.jetty.util_7.2.2.v20101205
> 38 ACTIVE org.eclipse.jetty.continuation_7.2.2.v20101205
> 39 ACTIVE org.eclipse.jetty.server_7.2.2.v20101205
> 40 ACTIVE org.eclipse.jetty.security_7.2.2.v20101205
> 41 ACTIVE org.eclipse.jetty.servlet_7.2.2.v20101205
> 42 ACTIVE org.eclipse.jetty.xml_7.2.2.v20101205
> 43 ACTIVE org.apache.geronimo.specs.geronimo-servlet_2.5_spec_1.2.0
> 44 ACTIVE org.apache.geronimo.specs.geronimo-servlet_3.0_spec_1.0.0
> 45 ACTIVE org.apache.servicemix.bundles.jetty-bundle_6.1.24.2
> 46 ACTIVE org.ops4j.pax.web.pax-web-api_0.8.1
> 47 ACTIVE org.ops4j.pax.web.pax-web-spi_0.8.1
> 48 ACTIVE org.ops4j.pax.web.pax-web-runtime_0.8.1
> 49 ACTIVE org.ops4j.pax.web.pax-web-jetty_0.8.1
Can you also try adding
org.ops4j.pax.web/pax-web-jsp
org.ops4j.pax.web/pax-web-extender-war
org.ops4j.pax.web/pax-web-extender-whiteboard
org.ops4j.pax.url/pax-url-war
I know for TSF, we had some issues getting things to properly deploy without
those even though we don't use the war based things. Haven't really
investigated why.
Dan
>
> With this jetty is started, port 8080 is opened as desired and the log
> output changed in a promising way.
> But unfortunately the web service ist still not available on
> http://localhost:8080/cxf/CustomerServicePort?wsdl or other URLs I tried:
>
> HTTP ERROR: 404
> Problem accessing /cxf/CustomerServicePort. Reason:
> Not Found
> Powered by Jetty://
>
> Adding the transportId to jaxws:endpoint in beans.xml does not lead to any
> improvements.
>
> I didn't find the time to investigate TSF, but from what I read on your
> blog and the web site is sounds very interesting and promising. I will try
> it out tomorrow.
>
> Please let me know if you have more suggestions for my current container.
>
> Best Regards,
> Markus
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: Web Service in OSGi with spring-dm
Posted by Markus <zo...@web.de>.
Hello Freeman, hello Daniel,
thanks a lot for your help.
I added a lot of bundles to my containter:
35 ACTIVE org.eclipse.jetty.io_7.2.2.v20101205
36 ACTIVE org.eclipse.jetty.http_7.2.2.v20101205
37 ACTIVE org.eclipse.jetty.util_7.2.2.v20101205
38 ACTIVE org.eclipse.jetty.continuation_7.2.2.v20101205
39 ACTIVE org.eclipse.jetty.server_7.2.2.v20101205
40 ACTIVE org.eclipse.jetty.security_7.2.2.v20101205
41 ACTIVE org.eclipse.jetty.servlet_7.2.2.v20101205
42 ACTIVE org.eclipse.jetty.xml_7.2.2.v20101205
43 ACTIVE org.apache.geronimo.specs.geronimo-servlet_2.5_spec_1.2.0
44 ACTIVE org.apache.geronimo.specs.geronimo-servlet_3.0_spec_1.0.0
45 ACTIVE org.apache.servicemix.bundles.jetty-bundle_6.1.24.2
46 ACTIVE org.ops4j.pax.web.pax-web-api_0.8.1
47 ACTIVE org.ops4j.pax.web.pax-web-spi_0.8.1
48 ACTIVE org.ops4j.pax.web.pax-web-runtime_0.8.1
49 ACTIVE org.ops4j.pax.web.pax-web-jetty_0.8.1
With this jetty is started, port 8080 is opened as desired and the log
output changed in a promising way.
But unfortunately the web service ist still not available on
http://localhost:8080/cxf/CustomerServicePort?wsdl or other URLs I tried:
HTTP ERROR: 404
Problem accessing /cxf/CustomerServicePort. Reason:
Not Found
Powered by Jetty://
Adding the transportId to jaxws:endpoint in beans.xml does not lead to any
improvements.
I didn't find the time to investigate TSF, but from what I read on your blog
and the web site is sounds very interesting and promising. I will try it out
tomorrow.
Please let me know if you have more suggestions for my current container.
Best Regards,
Markus
--
View this message in context: http://cxf.547215.n5.nabble.com/Web-Service-in-OSGi-with-spring-dm-tp3306001p3308297.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Web Service in OSGi with spring-dm
Posted by Daniel Kulp <dk...@apache.org>.
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
dkulp@apache.org
http://dankulp.com/blog