Alexander Klimetschek skrev:
Maybe a solution is to state the content type in the *calling* sitemap. I
cannot imagine a situation where your postable source could result in
different content types. You want control over that, because you probably
continue processing the returned data in the calling sitemap and there you cannot select between two versions. I can only think of XML processing (aka
text/xml) here anyway.

So this content type will be somehow injected into the postable source and
if the real content type is a different one, an exception is thrown.

WDYT? Are there any counter examples?
Don't know. The most important scenario for variable return content type is for content negotiation. If you POST something I guess that the input and output mime type would be the same in most cases.
But maybe there are some other cases.

A somewhat hacky solution of the problem would be to let the ServletServiceSerializer get the object model from the environment. From that one can get the http request object and set the content type during serializer execution (e.g. in the startDocument() method) instead of during pipeline setup.

/Daniel

Reply via email to