cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Jervis" <j...@iona.com>
Subject RE: Using verbs other than GET from a RESTful client application
Date Tue, 16 Oct 2007 00:06:46 GMT
I wont be surprised at all if this does not work, we did not spent much time on this before
anyway. There is also a discussion in JSR-311 mailing list on whether or not it is worth having
such APIs for a RESTful client. For the time being, you can write your own code to handle
client request, it is straightforward to do so (probably this is another reason why we don't
need client APIs). I have a system test which is using HttpClient to invoke REST services:
 trunk\systests\src\test\java\org\apache\cxf\systest\jaxrs\JAXRSClientServerBookTest.java
on jsr311 branch (https://svn.apache.org/repos/asf/incubator/cxf/branches/jliu)

Cheers,
Jervis

> -----Original Message-----
> From: Dan Diephouse [mailto:dan.diephouse@mulesource.com]
> Sent: 2007?10?16? 5:10
> To: cxf-dev@incubator.apache.org
> Subject: Re: Using verbs other than GET from a RESTful client 
> application
> 
> 
> Hiya,
> 
> Seems it may not have been finished? Looking at the 
> ClientTest I don't 
> see tests for PUT/POST which is odd. Could've sworn I tested 
> it at some 
> point, but guess I was wrong? I will have to add it to my list to fix 
> up/investigate.
> 
> - Dan
> 
> Glynn, Eoghan wrote:
> > Folks,
> >
> > Does CXF support usage of verbs other than GET from a RESTful client
> > application? (taking the HTTP binding approach as opposed to JAX-WS
> > Provider/Dispatch)
> >
> > Or more specifically, does the CXF HTTP binding support 
> injection into
> > parameterized URIs and payload construction for POST, PUT & DELETE?
> >
> > I notice that the RestClientServerBookTest only excercies
> > BookService.get{Book|Books|AnotherBook}, but not
> > BookService.{update|add|delete}Book.
> >
> > Similarly the restful_http_binding demo only calls 
> GET-based operations
> > from the programmatic client, and relies on the wget 
> utility to drive
> > the POST, PUT & DELETE-based operations.
> >
> > Calling for example Customer.updateCustomer() from the client code
> > results in a broken target URI (just "/xml" as opposed to
> > "/xml/customers/123") and an empty request body.
> >
> > Does anyone know if this is a known restriction of the HTTP binding
> > (that the demo and system have carefully side-stepped), or 
> just a bug,
> > or would it be expected to work?
> >
> > I know there's a separate problem with DELETE
> > (java.net.ProtocolException: HTTP method DELETE doesn't 
> support output),
> > but I would have expected POST and PUT to work from client code.
> >
> > Cheers,
> > Eoghan
> >
> > ----------------------------
> > IONA Technologies PLC (registered in Ireland)
> > Registered Number: 171387
> > Registered Address: The IONA Building, Shelbourne Road, 
> Dublin 4, Ireland
> >   
> 
> 
> -- 
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
> 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Mime
View raw message