You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2001/04/27 04:19:14 UTC

cvs commit: xml-axis/java/src/org/apache/axis/transport/http AxisServlet.java

rubys       01/04/26 19:19:14

  Modified:    java/src/org/apache/axis/transport/http AxisServlet.java
  Log:
  Temp hack - solves a problem of incomplete XML being passed to SAX.
  
  Once I get enough of a scenario up and running, I promise to come
  back and replace this with a FixedLengthInputStream.
  
  Revision  Changes    Path
  1.12      +13 -1     xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java
  
  Index: AxisServlet.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/transport/http/AxisServlet.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AxisServlet.java	2001/04/11 01:59:59	1.11
  +++ AxisServlet.java	2001/04/27 02:19:14	1.12
  @@ -109,7 +109,19 @@
       /*******************************************************************/
       MessageContext    msgContext = new MessageContext();
       InputStream       inp        = req.getInputStream();
  -    Message           msg        = new Message( inp, "InputStream" );
  +    //Message         msg        = new Message( inp, "InputStream" );
  +
  +    /**********************************************************/
  +    /* BEGIN TEMP HACK: stream may not be fully available yet */
  +    int expectedLength = req.getContentLength();
  +    byte buf[] = new byte[expectedLength];
  +    InputStream is = req.getInputStream();
  +    is.read(buf, 0, expectedLength);
  +    ByteArrayInputStream bais =
  +      new ByteArrayInputStream(buf, 0, expectedLength);
  +    Message msg = new Message( bais, "InputStream" );
  +    /* END TEMP HACK: stream may not be fully available yet */
  +    /**********************************************************/
   
       /* Set the request(incoming) message field in the context */
       /**********************************************************/