We are developing a client-server web application. We are communicating with the server through a socket using XML. We are facing a problem while uploading documents. What we are doing is, reading the file, encoding it and send as XML. In the server side decode it, write it into a file. But the file is getting corrupted. please help.
Taken from your post: reading the file, encoding it and send as XML. In the server side decode it, write it into a file
Are you missing something, failed to extract the contents from the XML. Sending Side: Read->Encode->Send as XML Receiving Side: Extract From XML->Decode->Write to File.
Thanks,<p>Vijay<p>The Hand that gives, Gathers.
Joined: Oct 29, 2002
We are doing in the same way you suggested. We are uploading it directly to one machine and another through socket using xml. The first gets uploaded correctly, but the one send through socket is getting corrupted. But this works for simple, and very small text files with 5-6 lines. But as the size grows larger, the file is getting corrupted. Can you please help?
Joined: Jan 27, 2003
Hi Vidya, I am not getting any hint on where could be the problem. The problem might the size that is not taken into account in any of the process. Since I am not aware of the encoding and decoding part, I suggest to try it out, Without sending the XML you can decode and write that to a file and verify that whether this part works well. Absolutely the sockets are fool-proof, as you are able to send and receive data and there is no restriction of the size of data that has been sent. Just verify the encoding and decoding part, that could be the culprit. Hope this helps