axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Franck Leplé <leple.fra...@tiscali.fr>
Subject Compressed attachment file locked
Date Mon, 15 Nov 2004 13:53:41 GMT
    Hello,
Since I didn't get any response I thought I should try again.I have created
some Web Services with compressed attachments. The problem is on the server
side, the zip file passed by attachment is locked by Axis and I can't delete
it. I have looked at the thread "ttachment and closed stream question" (see
"http://marc.theaimsgroup.com/?l=axis-user&m=109598153701095&w=2") but the
solution is useful for the client side only.I tested it with AXIS 1.1 and
AXIS 1.2RC1. I write the following code on my server
:-----------------------------------------org.apache.axis.MessageContext
msgContext = org.apache.axis.MessageContext.getCurrentContext();
org.apache.axis.Message msg = msgContext.getResponseMessage();
msg.getAttachmentsImpl().setSendType(org.apache.axis.attachments.Attachments
.SEND_TYPE_DIME); ByteArrayDataSource bads = new ByteArrayDataSource(new
File(zipFile), "application/x-zip-compressed"); DataHandler dh = new
DataHandler(bads);org.apache.axis.attachments.AttachmentPart replyPart = new
org.apache.axis.attachments.AttachmentPart(dh);
msg.addAttachmentPart(replyPart);-----------------------------------------An
yone have an idea?Thanks for helpFranck



Mime
View raw message