JS,
Have you installed on SMX4 the following bundle :
<bundle>mvn:org.apache.servicemix.cxf/org.apache.servicemix.cxf.transport.osgi/4.0.0</bundle>
and add the following line(s) in your spring XML config file :
<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" />
Regards,
Charles
On Mon, Apr 20, 2009 at 5:14 PM, jsbournival <[email protected]> wrote:
>
> Fair enough.
>
> But how do I tell Fuse/SM to use the "cxf-transport-osgi servlet style
> transport" ?
>
> Thanks for your answers.
>
> JS.
>
>
>
> Eoghan Glynn-4 wrote:
> >
> > 2009/4/20 jsbournival <[email protected]>:
> >>
> >> AFAIK, configuring a restful service requires to specify this snippet of
> >> XML
> >> code in the spring meta-inf file:
> >>
> >> <jaxrs:server address="http://localhost:9080/">
> >> <jaxrs:serviceBeans>
> >> <ref bean="restfulService"/>
> >> </jaxrs:serviceBeans>
> >> </jaxrs:server>
> >>
> >> It's working fine.
> >>
> >> What is bugging me is the fact that I need to pick a server address,
> with
> >> a
> >> port. What if 3 people are working on 3 different bundle containing a
> >> JAX-RS
> >> service.
> >
> > If you're using the cxf-transport-osgi servlet style transport, then
> > you do not need to specify the full listen URI (i.e.
> > "http://localhost:9080/" in your case).
> >
> > Instead you can just specify the context path in <jaxrs:server>
> > address attribute, and this is appended to a root URI of
> > http://localhost:8080/cxf, or whatever port you've configured.
> >
> > So for example, your three bundles could be configured like so:
> >
> > <jaxrs:server address="/first" ...>
> >
> > <jaxrs:server address="/second" ...>
> >
> > <jaxrs:server address="/third" ...>
> >
> > BTW I'm working thru' some minor issues in using CXF JAX-RS with the
> > cxf-transport-osgi stuff, but it should be working soon.
> >
> > Cheers,
> > Eoghan
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Multiple-REST-services-on-SM4-OSGi-tp23137516p23138707.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>