Grzegorz Kossakowski wrote:
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?

Easy. Delete service. Takes request parameter as input and goes in and deletes stuff identified by this parameter.


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.

There are lots of real life web services which do not take (posted) data as an argument. Plenty of services can work only off parameters. Weather, stocks, etc.


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.

How about casual OPTIONS operation? How do I do it with FileGenerator?

Vadim

Reply via email to