You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by h_...@cec-ltd.co.jp on 2006/10/20 10:33:26 UTC

Axis Bug? temporary file is not deleted.

Hi,

I am using file attachments with Axis1.4.

Axis makes the temporarily file for the following pass. 
However, those files are not deleted. 

-Sending file from client to service:  WEB-INF/attachments (Tomcat)
-Sending file from service to client: C:\DOCUME1\user\Local Settings\Temp\Axis29066.att" 

I don't understand why the temporary file is not deleted.
Please let me know.

Here is my source code.
--------------------------------------------------------
Message msg = call.getMessageContext().getResponseMessage();
Attachments msgAttas = msg.getAttachmentsImpl();

Collection collection = msgAttas.getAttachments();
AttachmentPart[] attachmentParts = (AttachmentPart[]) collection.toArray(new AttachmentPart[0]);

FileOutputStream fs = null;
fs = new FileOutputStream(filePath);
attachmentParts[0].getDataHandler().writeTo(fs);
fs.close(); 
--------------------------------------------------------
Jdk1.4
Tomcat4
Windows2000

thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org