[prev in list] [next in list] [prev in thread] [next in thread]
List: axis-dev
Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis Message.java
From: Glen Daniels <gdaniels () allaire ! com>
Date: 2001-02-21 21:25:38
[Download RAW message or body]
I'm working on tracking down just what the real problem is here. I'll
update the list as soon as I have more info. I strongly suspect we'll be
able to find a better workaround, but since this is prototype-level code, I
wanted to get it working now. It was certainly not my intention to limit
the opportunity for us to stream in messages in the real code.
--G
> -----Original Message-----
> From: Doug Davis [mailto:dug@us.ibm.com]
> Sent: Wednesday, February 21, 2001 4:19 PM
> To: axis-dev@xml.apache.org
> Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis
> Message.java
>
>
> I agree that what's there might not stay, but you replaced an
> InputStream
> with something that reads everything into memory - if we have
> to do that
> for a bug in something then I would think that the entire
> streaming issue
> is at risk.
> -Dug
>
>
> Glen Daniels <gdaniels@allaire.com> on 02/21/2001 04:09:55 PM
>
> Please respond to axis-dev@xml.apache.org
>
> To: "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
> cc:
> Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis
> Message.java
>
>
>
>
> I'm assuming that the Message stuff that's in there now isn't
> going to be
> the final version anyway, so for now this fix gets me up and
> running, and
> we'll deal with any problems that occur with the "real" code
> once we've got
> it. The whole streaming issue is a big open issue which we
> need to deal
> with sometime soon anyway.
>
> --Glen
>
> > -----Original Message-----
> > From: Doug Davis [mailto:dug@us.ibm.com]
> > Sent: Wednesday, February 21, 2001 4:04 PM
> > To: axis-dev@xml.apache.org
> > Subject: Re: cvs commit: xml-axis/java/src/org/apache/axis
> > Message.java
> >
> >
> > Is this going to kill the idea of streaming? Seems like a
> > read problem
> > if we can't leave it as an InputStream.
> > -Dug
> >
> > gdaniels@apache.org on 02/21/2001 02:18:34 PM
> >
> > Please respond to axis-dev@xml.apache.org
> >
> > To: xml-axis-cvs@apache.org
> > cc:
> > Subject: cvs commit: xml-axis/java/src/org/apache/axis Message.java
> >
> >
> >
> > gdaniels 01/02/21 11:18:32
> >
> > Modified: java/src/org/apache/axis Message.java
> > Log:
> > Read in the characters from the Servlet's InputStream into
> > a char array,
> > as was done by v2.1, instead of using the InputStream
> > directly for XML
> > parsing. This works around some kind of interaction bug between
> > Xerces and JRun where no Servlet output was produced. Need to
> > track this and resolve it for real in the future.
> >
> > Revision Changes Path
> > 1.10 +15 -3
> xml-axis/java/src/org/apache/axis/Message.java
> >
> > Index: Message.java
> >
> ===================================================================
> > RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
> > retrieving revision 1.9
> > retrieving revision 1.10
> > diff -u -r1.9 -r1.10
> > --- Message.java 2001/02/10 04:39:53 1.9
> > +++ Message.java 2001/02/21 19:18:28 1.10
> > @@ -68,6 +68,7 @@
> > /**
> > *
> > * @author Doug Davis (dug@us.ibm.com)
> > + * @author Glen Daniels (gdaniels@allaire.com)
> > */
> > public class Message {
> > /**
> > @@ -211,9 +212,20 @@
> > try {
> > if ( currentForm.equals("InputStream") )
> > reader = new InputStreamReader( (InputStream)
> > currentMessage );
> > - else if ( currentForm.equals("ServletRequest") )
> > - reader = new InputStreamReader( ((HttpServletRequest)
> > currentMessage).
> > - getInputStream() );
> > + else if ( currentForm.equals("ServletRequest") ) {
> > + HttpServletRequest req =
> > (HttpServletRequest)currentMessage;
> > +
> > + int contentLength = req.getContentLength();
> > + Reader requestReader = req.getReader ();
> > + char[] payload = new char[contentLength];
> > + int offset = 0;
> > +
> > + while (offset < contentLength) {
> > + offset += requestReader.read (payload, offset,
> > contentLength
> > - offset);
> > + }
> > +
> > + reader = new CharArrayReader(payload);
> > + }
> > else if ( currentForm.equals("String") )
> > reader = new StringReader( (String) currentMessage );
> > else if ( currentForm.equals("Bytes") ) {
> >
> >
> >
> >
> >
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic