The whole module idea is really great but (please correct me if I'm wrong):

>    <map:generate type="file" src="module:request:inputStream"/>
The o.a.c.components.modules.input.RequestModule provides this:

return ObjectModelHelper.getRequest(objectModel);

getRequest returns o.a.c.environment.Request which is an interface that is not
bound to http. You cannot reach the request's body from here. 

To be able to read from input stream one has to do this:

HttpServletRequest request =    
  (HttpServletRequest) objectModel.get( HttpEnvironment.HTTP_REQUEST_OBJECT );
int contentLength = request.getContentLength();
PostInputStream stream = new PostInputStream(    request.getInputStream(),

                                                contentLength   );
InputSource     contentSource = new     InputSource( stream );
parser = ( DOMParser ) manager.lookup( DOMParser.ROLE );
return parser.parseDocument( contentSource );

How can I reach the XModuleSource from XSP? I need it for processing XML
document that is passed as request body (right now I use the code pasted
above).

        ouzo

Reply via email to