Closed thanhlq closed 8 years ago
2 things. Can you remove the @PathParam( "id" )
from the implementation? And second, are you sure you have registered the interface as a service and not the implementing class? Please post your component definition to get further feedback
Oh perfect!, thanks very much! I removed the @PathParam("id") and it worked.
My component defintion:
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="ProductService">
<implementation class="com.eclipsesource.jaxrs.connector.example.ds.provider.ProductService"/>
<service>
<provide interface="com.eclipsesource.jaxrs.connector.example.ds.api.IProductService"/>
</service>
</scr:component>
Today I am trying this example: com.eclipsesource.jaxrs.connector.example.ds, it worked well for me but I want to split the service declaration and implementation like this:
==> But only the second Get is working (getAllProducts), the getProductById is NOT working - I got HTTP 404 error.
Anyone has an idea?
Thank you very much!
(I am just brand-new to Jersey/osgi-jax-rs-connector.)