2

I went through http://cxf.apache.org/docs/jax-rs-client-api.html documentation but I am still not sure which type of rest client should be used in what use cases?

Can anyone point out the use cases / constraints with examples that would help me in choosing the right client API.

Atul
  • 1,694
  • 4
  • 21
  • 30
  • Begin with the-now-standard JAX-RS client API as it is portable (between JAX-RS implementations). I doubt you will see any limitations there (there are none listed there, anyway). – V G Apr 09 '14 at 09:42

1 Answers1

0

CXF 3.0 implement the JAXRS 2.0 client API, it makes your code can work with other JAXRS implementation without changing anything.

But if you are still using CXF 2.x, you need to chose between the Proxy Based API and WebClient API.

The Proxy Based API is much like the CXF JAXWS Client API, you can just invoke the service from a Proxy which implement the interface of SEI. It has some shortcomings, you cannot specify the http hears or write a generic client to invoke the different JAXRS services.

With the help of CXF WebClient API, you can invoke the JAXRS services in a normal HTTP client way, which just fill the gap of Proxy Based API.

You can find more information about those clients API here.

Willem Jiang
  • 3,291
  • 1
  • 14
  • 14