felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Bakker <paul.bak...@luminis.eu>
Subject Re: Registering REST web service without default path services
Date Wed, 03 Jun 2015 13:50:50 GMT
Mandatory, no; you can use another framework/your own implementation to
work with JAX-RS in OSGi. It is a very convenient way however, but as an
Amdatu developer I'm probably biased ;-) Take a look at the video and
decide for yourself.

Cheers,

Paul

On Wed, Jun 3, 2015 at 3:47 PM ismail berrada <ismaberrada@yahoo.fr> wrote:

>  Thanks Paul for your answer. So does it means that I have to use Amdatu
> component ?
> Is it mandatory ? Is it the easiest way to do this  ?
> Regards
>
>
>
>
>
>
>      Le Mercredi 3 juin 2015 15h28, Paul Bakker <paul.bakker@luminis.eu>
> a écrit :
>
>
>
>  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 <ismaberrada@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
> >
> >
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message