You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Breiter, Andreas" <An...@t-systems.com> on 2002/02/19 13:57:06 UTC
StreamGenerator hangs up
Hi,
I'm using Cocoon 2.0.1 with Tomcat 4.0.2-b2 on WindowsNT 4.0/SP5 with JDK
1.3.0.
I tried a code piece I found in one of the mailing lists concerning the
StreamGenerator, because I'm trying to use Cocoon2 as a XML 2 PDF converter.
I want to send an XML-document and get back a PDF. My XML- and XSL(T)-files
are ok, they work if I use the default file generator with this sitemap
configuration:
<map:pipeline>
<map:match pattern="report/*" type="wildcard">
<map:generate src="{1}.xml" />
<map:transform src="{1}.xsl" />
<map:serialize type="fo2pdf" />
</map:match>
</map:pipeline>
Every XML-doc has a corresponding XSL-doc with the same name. Works fine.
Now I want to put only the XSL-files into the Cocoon dir and send my XML
data via HTTP-POST.
This is the sitemap config I use to do this:
<map:pipeline>
<map:match pattern="stream/*" type="wildcard">
<map:generate type="stream" />
<map:transform src="{1}.xsl" />
<map:serialize type="fo2pdf" />
</map:match>
</map:pipeline>
I wrote a simple class which retreives the XML from a file and uses the
filename without path and extention to form the request URL,
but when I call it with a valid XML-file, the Tomcat-Java-process uses up to
100% CPU time and never get's back. I also tried the latest Cocoon
development build (20020218112639), but that changed nothing. Do you have
any idea what I might do wrong?
Thanx,
Andreas
P.S.: I attached the source of my class and my demo xml/xsl files.
<<Demo.xml>> <<Demo.xsl>> <<XML2PDF_Stream_Socket.java>>