Grzegorz Kossakowski wrote:
Vadim Gritsenko napisaƂ(a):
Grzegorz Kossakowski wrote:
<map:serialize type="servletService">
  <map:parameter name="service" value="servlet:forms:/renderForms"/>
</map:serialize>

Just a nitpick, but I think this syntax would be sweeter:

 <map:serialize type="service" src="servlet:forms:/renderForms"/>

Notice also streamlined value for the type attribute. Less typing, and why would have to highlight that it's a "servlet"? Are there any other types of Cocoon services?


I wanted to stay consistent with rest components, especially generator, see: http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-sample/src/main/resources/COB-INF/test1/sitemap.xmap
In generator we already use src attribute for different purpose.

It does not seem logical to me -- logically, generator should be posting request contents to the service, similar to as serializer writes out service response into the response:

  Request      --> Service Generator   --> SAX Pipeline
  SAX Pipeline --> Service Transformer --> SAX Pipeline
  SAX Pipeline --> Service Serializer  --> Response

Generator as defined in that linky is (IIUC) equivalent to file generator/service transformer pair, and the complete picture is inelegant:

  Src Attribute --> Service Generator   --> SAX Pipeline
  SAX Pipeline  --> Service Transformer --> SAX Pipeline
  SAX Pipeline  --> Service Serializer  --> Response

WDYT?

Vadim

Reply via email to