RE: HttpServletInputStream is corrupting data?

2005-02-21 Thread Varley, Roger
> 
> I'd worry about character encoding if I were you. I bet someone is
> transcoding. 
>

I'd thought about that, but if it was an encoding issue, wouldn't I expect the 
same problem regardless of whether I routed the request through IIS first or 
sent it directly to Tomcat? The XML header specifies "iso-8859-1" - I wouldn't 
have expected a problem in a UK locale with this.

Regards
Roger
 
> -Original Message-
> From: Varley, Roger [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 21, 2005 11:00 AM
> To: Tomcat Users List (E-mail)
> Subject: HttpServletInputStream is corrupting data?
> 
> Hi
> 
> I don't think that this is a Tomcat problem per-se, but it involves
> Tomcat so I'm asking here in the hope that someone else has seen this
> before.
> 
> An external program reads XML from a file on disk into a
> ByteArrayOutputStream to calculate the length of the data. The byte
> array is extracted from the stream and written to the 
> OutputStream of a
> URLConnection object which is pointing to my servlet running under
> Tomcat 4.1.31. The servlet reads the XML from the HttpServletRequest
> InputStream and performs an XSLT transformation on it.
> 
> If I point the URL to the normal port 80, the request is 
> routed through
> Microsoft IIS server and passed to Tomcat. The input stream read by
> Tomcat is corrupt - parts of the file are missing. However, if I point
> the URL to Tomcat directly via port 8080 everything works fine. I've
> verified that the original disk file is valid, the byte array 
> created by
> the external program is correct and contains correct data and that all
> the correct data is written to the URLConnection by the external
> program. Has anyone either seen something like this before or have any
> suggestions as to where to start looking.
> 
> Regards
> Roger
> 
> 
> __
> __
> __
> This e-mail and the documents attached are confidential and intended
> solely for the addressee; it may also be privileged. If you 
> receive this
> e-mail in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group liability cannot be triggered for the message content. Although
> the sender endeavours to maintain a computer virus-free network, the
> sender does not warrant that this transmission is virus-free and will
> not be liable for any damages resulting from any virus transmitted.
> __
> __
> __
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: HttpServletInputStream is corrupting data?

2005-02-21 Thread Benson Margulies
I'd worry about character encoding if I were you. I bet someone is
transcoding. 

-Original Message-
From: Varley, Roger [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 21, 2005 11:00 AM
To: Tomcat Users List (E-mail)
Subject: HttpServletInputStream is corrupting data?

Hi

I don't think that this is a Tomcat problem per-se, but it involves
Tomcat so I'm asking here in the hope that someone else has seen this
before.

An external program reads XML from a file on disk into a
ByteArrayOutputStream to calculate the length of the data. The byte
array is extracted from the stream and written to the OutputStream of a
URLConnection object which is pointing to my servlet running under
Tomcat 4.1.31. The servlet reads the XML from the HttpServletRequest
InputStream and performs an XSLT transformation on it.

If I point the URL to the normal port 80, the request is routed through
Microsoft IIS server and passed to Tomcat. The input stream read by
Tomcat is corrupt - parts of the file are missing. However, if I point
the URL to Tomcat directly via port 8080 everything works fine. I've
verified that the original disk file is valid, the byte array created by
the external program is correct and contains correct data and that all
the correct data is written to the URLConnection by the external
program. Has anyone either seen something like this before or have any
suggestions as to where to start looking.

Regards
Roger



__
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group liability cannot be triggered for the message content. Although
the sender endeavours to maintain a computer virus-free network, the
sender does not warrant that this transmission is virus-free and will
not be liable for any damages resulting from any virus transmitted.

__

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HttpServletInputStream is corrupting data?

2005-02-21 Thread Varley, Roger
Hi

I don't think that this is a Tomcat problem per-se, but it involves Tomcat so 
I'm asking here in the hope that someone else has seen this before.

An external program reads XML from a file on disk into a ByteArrayOutputStream 
to calculate the length of the data. The byte array is extracted from the 
stream and written to the OutputStream of a URLConnection object which is 
pointing to my servlet running under Tomcat 4.1.31. The servlet reads the XML 
from the HttpServletRequest InputStream and performs an XSLT transformation on 
it.

If I point the URL to the normal port 80, the request is routed through 
Microsoft IIS server and passed to Tomcat. The input stream read by Tomcat is 
corrupt - parts of the file are missing. However, if I point the URL to Tomcat 
directly via port 8080 everything works fine. I've verified that the original 
disk file is valid, the byte array created by the external program is correct 
and contains correct data and that all the correct data is written to the 
URLConnection by the external program. Has anyone either seen something like 
this before or have any suggestions as to where to start looking.

Regards
Roger


__
This e-mail and the documents attached are confidential and intended 
solely for the addressee; it may also be privileged. If you receive this 
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group 
liability cannot be triggered for the message content. Although the 
sender endeavours to maintain a computer virus-free network, the sender 
does not warrant that this transmission is virus-free and will not be 
liable for any damages resulting from any virus transmitted.
__

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]