You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Forum Specific <fo...@gmail.com> on 2008/10/24 08:19:41 UTC
Jax-ws or Jax-rs
Hi all,
I have to implement Restful web services using CXF in my project. Can
anybody please suggest me which one API I should use to implement RestFul
web services.Either I should go with Jax-ws endpoint , Provider and
Dispatcher or I should go with Jax-rs.
Please reply me back with the suggessions immediately as I need it on urgent
basis.
Thanks in advance,
Regards
RB
Re: Jax-ws or Jax-rs
Posted by Sergey Beryozkin <se...@progress.com>.
Hi
In one of our internal projects I was involved at a time we used a JAX-WS Provider<Source> support
to do RESTful services and it worked quite well. Arguably, when you work with Provider<Source>, you kind of need to do a bit of
extra work yourself, like checking yourself what HTTP Method was involved, any headers involved, etc, all through a injected
WebServiceContext. Yet, one can argue, that in this case the application code was 'free' from various rest-centric annotations. And
yes, it was JAX-WS.
JAX-RS is geared toward making it easy and one can say enjoyable for developers to do RESTful services. Even though it depends on a
lot of annotations be available in the source code (hence one should plan on what happend when the resource pathes change, rules for
the content negoatiotion change, etc), one can put then at the interface/abstract class level and minimize the amount of changes
when they're needed to be done. We also have some ideas in mind on how to do JAX-RS without explicit annotations. Finally, with
JAX-RS, one can quite easily combine JAX-WS and JAX-RS java-first services, possibly using the common interface and implementation
class. We also have ideas on how to make this work very well in the future
Hope it helps
Sergey
> Hi all,
>
>
>
> I have to implement Restful web services using CXF in my project. Can
> anybody please suggest me which one API I should use to implement RestFul
> web services.Either I should go with Jax-ws endpoint , Provider and
> Dispatcher or I should go with Jax-rs.
>
> Please reply me back with the suggessions immediately as I need it on urgent
> basis.
>
>
>
> Thanks in advance,
>
>
>
> Regards
>
> RB
>