cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: More problems with implementing servlet services
Date Wed, 06 Jun 2007 18:50:04 GMT
Vadim Gritsenko pisze:
> I don't buy it. What about PUT? DELETE? TRACE? OPTIONS? HEAD? Is every 
> method going to get its own syntax and its own generator type? 
> GetGenerator, PostGenerator, DeleteGenerator? It does not make any sense 
> to me.

Servlet services are tied to POST request and there is no way to call the _service_ using
DELETE method. How could you interpret such a 
call? Servlet services called during pipeline processing are about transforming the XML and
usually they are expected to have no side-effects.

To answer you question, there will no syntax for PUT, DELETE, TRACE, OPTIONS, HEAD because
all of them are not service calls.

> Request is a request is a request. Request method is just one 
> single piece of information in the request and it is not making 
> conceptual difference. Ideally all request method should be treated 
> equally. In the case of this service generator, it just means it should 
> take parameter specifying what request method to use... what headers to 
> set... what data to include in the body (notice how I avoided the word 
> 'post' here - cause it could be 'put', or any other method)... But the 
> src attribute of generator is url of the service - everything else is an 
> optional parameter: request method defaults to GET, request body by 
> default is empty

The request body cannot be empty because the called pipeline has no data to start with. Empty
data means that it's _not_ the service call. 
If you just want to perform casual GET you should use servlet: source with FileGenerator exactly
the same way as for any other GET operation.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Mime
View raw message