cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: More problems with implementing servlet services
Date Wed, 16 May 2007 15:07:45 GMT
Alexander Klimetschek wrote:
> Reinhard Poetz schrieb:
>> I think the problem here is that we have two sources and depending on 
>> the context, one is the "main" source. But if it's only me having this 
>> view on that, I won't argue for it any more.

<me-too/>

>> Any other opinions?
> 
> I tend to Reinhard's opinion: from the user POV the src should state the 
> service, because that is where I get my data from, ie. the data that is 
> used in the subsequent pipeline.
> 
> The important point is how this compares with a simple servlet call, 
> where I don't want to POST anything but simply retrieve data:
> 
> <generate src="servlet:something:/foo/bar" />

Or
   <generate type="service" src="servlet:something:/foo/bar" />

So that you get access to original request in the service (see below...)


> In this case you state the servlet as source. And this guides the user's 
> model when adding the POST-feature; thus it is more natural to think of 
> the POST as an addition, simply by using another generator and an 
> additional parameter (I'd name it "postData" to be more concise):
> 
> <generate type="servletService" src="servlet:something:/foo/bar">
>   <parameter name="postData" src="test.htm" />
> </generate>
> 
> Only that seems logic to me...
> 
> Another question: did you think of the possibility of posting the 
> initial HTTP request body to the servlet service? Eg. having a postData 
> (or src) parameter like
> 
>   <parameter name="postData" src="request:body" />

I'd hope that the default behavior would be to always *pass* the original 
request forward to the service if this parameter is omitted.

I've used word 'pass' since original request could be GET, POST, PUT, ... anything.

Vadim


> ???? A use case would be upon a PUT of some XML data from a client to a 
> server and as a first step you wanna send the XML to a validating service.
> 
> Alex


Mime
View raw message