You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Uwe Gerger <Uw...@bmw.de> on 2003/07/27 15:32:58 UTC

StreamGenerator: No response for xml-streams larger then 130594 bytes

Hello,
i use the Streamgenerator to tramsform a xml-stream to excel. But when
sending a stream larger then 130594 bytes I do not receive any response
from Cocoon (for tests I'm using the XMLSerializer). Cocoon didn't
report any error in the log files. With streams that are less then
130594 bytes all works well!

I'm sending the stream using the following test class:

public class Reverse
{
   public static void main(String[] args) throws Exception
   {

      String stringToReverse = getString();

      URL url = new URL("http://localhost:8080/BMW_WRP/stream.xml");
      HttpURLConnection connection = (HttpURLConnection)
url.openConnection();
      connection.setRequestProperty("Content-Type", "text/plain");
      connection.setDoOutput(true);
      connection.setDoInput(true);

	//send the bytes to cocoon
      PrintWriter out = new PrintWriter(connection.getOutputStream());
      out.println(stringToReverse);
      out.close();

       BufferedReader in =
               new BufferedReader(new
InputStreamReader(connection.getInputStream()));
       String inputLine;

	//print out the bytes received      
       while ((inputLine = in.readLine()) != null)
               System.out.println(inputLine);
      in.close();
   }

   static String getString()
   {
      File file =
         new
File("c:/eclipse/workspace/BeanConnection2/resources/output_med.xml");

      //reads the file
      FileReader fr = null;
      try
      {
         fr = new FileReader(file);
      }
      catch (FileNotFoundException e)
      {
         e.printStackTrace();
      }

      //memory allocation for the data-array
      char caData[] = new char[(int) file.length()];

      //this gets the data, each char into the char array
      int length = 0;
      try
      {
         length = fr.read(caData);
      }
      catch (IOException e1)
      {

         e1.printStackTrace();
      }

      //convert char array to string
      String sContent = new String(caData, 0, length);

      try
      {
         fr.close();
      }
      catch (IOException e2)
      {

         e2.printStackTrace();
      }

      return sContent;
   }
}


Thanks in advance
	Uwe
-- 
Uwe Gerger                                _/_/_/   _/    _/  _/    _/
BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
mailto:Uwe.Gerger@bmw.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org