Nicola Ken Barozzi wrote: [...]
Yes, I understood, I replied with the possibility of a source that builds on the Request inputstream.
Ok, what would be the InputStream for:
(1) CommandLineEnvironment
(2) JMSEnvironment
(3) SMTPEnvironment
[thinking process goes here]
Possibilities:
(1) Empty?
(2) new StringBufferInputStream(textMessage.getText())?
(3) mimeMessage.getContentStream() or ((Multipart)mimeMessage.getContent()).getBodyPart(0).getContentStream()?
Point is - before adding getInputStream() there is a need to understand what does it mean outside of servlet env.
Same place where MIME is decrypted and file attachments are processed.
I don't understand what you want to do with the request factory here
If the Request interface doesn't have inputstream, it simply doesn't, what would you like to do with the factory?
Request i/face does not have inputstream right now, but it is still possible to process it - save files or read mime - thanks to request factories. Same here, if the only point is to read XML out of request input stream, this can be done in request factory and this XML could be saved as DOM object, as a request attribute(s) - same as FilePart is stored in the request now.
For SMTPEnvironment, this can be several DOM objects - one per each MimePart containing XML, also you can save attachements the way it's done for servlet environment, and have plain text as request attributes too.
[...]
Is there any justification for getInputStream() for non-servlet environment?
Simple example: web services. the request contains the data that I must process.
Bad example. It is servlet environment, again. It is not command line or other environment.
Good example. Web services are not done only on servlets. Messaging systems use asynch web services.
Ok, two examples are above - for JMS and SMTP. For mime mail message, what part of the message do you want to stream?
Component systems are not based on servlets. SOAP can go almost everywhere.
If no, I think it's better to try to encapsulate servlet-specific logic into the factory.
What's your take?Show me the code.
Suggestion about factory is above.
I want to add a getInputStream() method to the Request interface. And make a cocoon source to get it in the sitemap.
If input stream works for all evironments, then it's the way to go. But I'm just not convinced yet.
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]