I am using the example cxf-jaxrs shipped with
apache-servicemix-4.3.0-fuse-03-00.tar.gz to investigate how to deploy
multiple bundles which provides different RESTful services. What I did is
copied the cxf-jaxrs example into cxf-jaxrs-example-1, and modified the
pom.xml and beans.xml. The modifications are :

1. pom.xml
version: 4.3.0-2-fuse-03-00
name: Apache ServiceMix Example 2:: CXF JAX-RS OSGI
2. beans.xml
<jaxrs:server id="customerService2" address="/crm2">

Then I made two packages. The one is the original example package
cxf-jaxrs-4.3.0-fuse-03-00.jar and the other is the modified one
cxf-jaxrs-4.3.0-2-fuse-03-00.jar and I copied them into "deploy" directory.

After servicemix started, I see both bundles are active and started
succesfully.

But, I am only able to access the RESTful services in one bundle. When I
type "http://localhost:8080/cxf/crm2/customerservice/customers/123";, I got
"No service was found." error. And when I stop the other example bundle(the
original one), I can access "
http://localhost:8080/cxf/crm2/customerservice/customers/123"; with no
problems.

What I did wrong?? It is supposed to provides the RESTful services in both
context path "/crm" and "/crm2".

Reply via email to