A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Web Services
Author
How to cleanup the attachments
Anuj Aggarwal
Greenhorn
Joined: Mar 20, 2008
Posts: 1
posted
Sep 08, 2008 02:04:00
0
I have a web service which returns an attachment. Following is the code
public
DataHandler
getFile() throws
java.rmi.RemoteException
{
<some code that create the file "C:\1.zip">
DataHandler
attachment = new
DataHandler
(new
FileDataSource
("C:\1.zip"));
return attachment;
}
I want to delete the "C:\1.zip" after returning it from webservice. What are the different ways to do it. I would prefer to delete it within the call that is returning it. Is this possible ?
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: How to cleanup the attachments
Similar Threads
SOAP with attachments, 3 questions
SOAP compatibility
jsp email
A problem with Attachment using saaj
sending pdf or any attachment from a java webservice to java client using JAX-WS and SAAJ
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter