Hi Ismail,

You can configure the root path using the "wink.rest.path" property for PID
"org.amdatu.web.rest.wink".

I will create an issue to also document this on the website, it seems to be
missing.

Cheers,

Paul

On Wed, Jun 3, 2015 at 2:38 PM ismail berrada <ismaberr...@yahoo.fr> wrote:

> Hello,
> I'm using Felix and I expose a REST web service using jersey framework
> Everything works fine but every resources are accessible via the default
> path i.e. services.
> Each time I ask for a resource I send the following HTTP request template
>
> curl -v -X GET "http://localhost:8080/services/path/to/resource";
>
> Is there a way to change the default path ? I want to get my resources
> from URL like
>
> http://localhost:8080/path/to/resource
>
> Please note that my service is not a servlet and I also have several
> services!I tried to add properties to my service by adding a dictionnary
> object when registering the service
> Here is an extract of my Activator class
>
> [CODE]
> @Override
> public void start(BundleContext bundleContext) throws Exception {
>    try {
>
>     Dictionary<String,String> properties = new Hashtable<String, String>();
>     properties.put("root","/");
>
>     //....
>     // Register web services
>     webServiceRegistration =
> bundleContext.registerService(MyWebService.class, new MyWebService(),
> properties);
>
>     //.....
>
>     }
>     catch(Exception ex){
>     //handling ex
>     }
> }
> [/CODE]
>
> I can see in the web console that the service is registered and resources
> are still availaible with the unwanted URL
>
> Regards
>
>

Reply via email to