Requirement is to upload more than 600 documents to a server using webservice.
And im using axis Base64.encode method to encode the byte and before calling the webservice method.
Many a times im getting out of memory error at this encoding which i believe is caused when the file size is more than 1 MB.
Im converting the byte to Base64 Encoded String and convert it back to byte for uploading.
Any suggestions or better way to do this and prevent OOM error ..?
You are not saying what kind of way your client uses to assemble SOAP messages for the web service.
If you are using SAAJ, have you considered or tried to use the SOAPMessage.createAttachmentPart method that takes a DataHandler as parameter?
The DataHandler, in turn, is created with a DataSource as parameter and the DataSource instance is a FileDataSource.
Joined: Jun 02, 2009
Im using axis to generate the webservice stubs and the files which are uploaded are created run time.
calls to the webservice will look like