on 09-11-2007 7:19 AM
i have a webservice that allows me to upload a file. When i do j-unit tests the upload is always correct. The file is written on the server.
When i try this according the NW2004 file upload/download tutorial then the first upload i do works. The second one works also or so it seems. Since the webservice is successfully executed, but it only writes a file 1000bytes on the server.
When i do a tcpTrace i can see that the total message size is correct ,but the content-length in the soap envelope is only around 1000bytes. This is the problem is guess. But i dont know why is the cause.
has anybody else experienced this also? I dont think this is a WebDynpro problem perse, but like i said, the j-unit test are working everytime.
Thanks all for helping out.
Hi Martijn Koevoets,
Since you have written <b>first upload i do works</b>, the problems seems that memory being used to read file content is not cleared once read functionality is over. Please check it.
Thanks and Regards,
Ganga.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what i was thinking too. The code i use to clear the memory and objects i use is like this:
tempFile.delete();
wdContext.currentContextElement().setFileResource(null);
where tempFile is a temporary java.io.File which i create to write the bytes from the FileResource object of the context. This is done with a FileOutputStream object.
The above statements are done after the webservice call. So i woudl think that the memory is cleared and fresh for a new SOAP attachment when another upload begins.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.