cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sbery...@progress.com>
Subject RE: JAXRS - POST
Date Tue, 05 Jan 2010 17:24:06 GMT

Hi-,

GET issue :

remove (you do not really need it) :
web.type("application/json");

and then do

Customer customer = web.get(Customer.class);

Same for POST...

I'm wondering, after looking through your code, perhaps you'd really like to use a proxy-based
code ? If yes then you do not need to use a WebClient but use JAXRSClientFactory instead :

HelloService service = JAXRSClientFactory.createService(address);
Customers customers = service.getCustomers();
service.postCustomer(i, new Customer());

Also, the problem is that you have JAXRS annotations on the same method in the interface and
in the impl, so it will not work. Perhaps just move all the annotations to the interface.

Finally, you do not use JAXRS properly on the server side, replace an http-binding import
with the corresponding jaxrs one in your spring config...

Hope it helps, Sergey

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