cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet : Binary data transfer problem

Former Member
0 Kudos

Hi,

I have a problem transmitting binary data to a servlet. Every time I try to send a Zip file, only part of the data is received. I get message from Xi's web container that is was expecting X number of bytes but only Y number of bytes were received. I don't have this problem with text upload.

Can anyone help me figure this out?

Thank you,

Steeve

Accepted Solutions (1)

Accepted Solutions (1)

former_member184385
Active Participant
0 Kudos

Hi Steven,

are you talking about your own servlet. If so, is your servlet extending

- javax.servlet.HttpServlet or

- javax.servlet.GenericServlet

If it is extending HttpServlet , your should make it extend GenericServlet, to be able to handle arbitrary binary requests.

Hope, this helps a bit

Gregor

Former Member
0 Kudos

Hi,

Thanks for the hint, but i need to use HttpServlet. The servlet I am using is my own. I tested the code on Tomcat and I have no problem at all retrieving binary data using the .getInputStream(). On WebAs J2ee it doesnt work good. I'm always missing bytes. Do I need to configure some parameters?

Thanks,

Steeve

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

have a look at SAP Note 807000, which described the error you get as situation where timeout occurs while you read from the input stream. Maybe you can get around it if you increase the timeout in question.

Regards,

Ivo

Former Member
0 Kudos

Hi Steven,

Here is a link that perhaps can be useful to you :

http://help.sap.com/saphelp_nw04/helpdata/en/c1/0534420793ab04e10000000a1550b0/content.htm

Best Regards

Peter

former_member184385
Active Participant
0 Kudos

Hi,

don't have any immediate advice, how to solve your problem in first place. You will have to do some debugging. Here is a link to start with

http://help.sap.com/saphelp_nw04/helpdata/en/70/717cfb7d226e44ad4960877da612a4/frameset.htm

Regards

Gregor

Ps. We are at the same dilemma, quite comfortable with tomcat and fighting the new beast NW, haha, still some way to go to reach expert status