You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Hinrich.Boog" <hi...@infopark.de> on 2001/09/26 14:50:06 UTC

FO and Sockets.

Hi there,

I have a problem with using FOP over Sockets, maybe someone out there knows a workaround.
I just wanted to implement a small formatting Server, that listens to a port and in case a
request comes in, takes the xml:fo document from that request, transforms it and sends the
response back.

The communication works fine, the sending of the document and the transforming as well, I
just have to put it together, which does not work: My client sends the stuff, the server
starts transforming, but before the server is finished, the client shuts down.

Seems like the first part of my PDF document arrived, but then there's "null" and you can
use something like

while ((String in = inputStream.readLine()) != null) {
	//do something
}

Here's the stuff that comes out of the server as long as the clients working...

Trying to read the answer
%PDF-1.3
%����
null
Connection closed
File can be found in outfile.pdf

(At this time, the server was still building up the pages)

Does anyone know, how to handle this problem ?

Thanks
Hinrich


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: FO and Sockets.

Posted by Weiqi Gao <we...@networkusa.net>.
On Wed, 2001-09-26 at 07:50, Hinrich.Boog wrote:
> [...]
> 
> The communication works fine, the sending of the document and the
> transforming as well, I just have to put it together, which does not
> work: My client sends the stuff, the server starts transforming, but
> before the server is finished, the client shuts down.
>
> [...]

You would have better luck asking this question in a Java programming
mailing list or usenet group.  comp.lang.java.programmer maybe?  The
O'Reilly "Java I/O" book contains a chapter (I think) on Socket
programming.

-- 
Weiqi Gao
weiqigao@networkusa.net


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org