Hello.

I have File Attachment Troube.
I made a SOAP Client and SOAP Servre(TOMCAT) using Apache-SOAP.
To upload many file to SOAP Server, it create DataSouce many times

After 10 times looped, I got "Out of Memory".

Please teach me how to release memory(ByteArray or Byte).



Following is a part of my source code.

for(int i=0; i<100;i++) {
    DataSource ds1 = new ByteArrayDataSource(new
java.io.File("e:\\john.tif"), null);
    DataHandler dh1 = new DataHandler(ds1);
    DataSource ds2 = new ByteArrayDataSource(new
java.io.File("e:\\john.bmp"), null);
    DataHandler dh2 = new DataHandler(ds2);
    files.add(dh1);
    files.add(dh2);
    Parameter dataParam12 = new Parameter("files", Vector.class, files,
null);

    params.addElement(dataParam1);

......

call soap server
}


Reply via email to