[ 
http://issues.apache.org/jira/browse/AXIS-2037?page=comments#action_12312755 ] 

Sunil Sane commented on AXIS-2037:
----------------------------------

Hi Tom,

What my assumption is that AXIS uses temp file to carry the attachment over to 
server or vice-versa. Once the attachment's goes out of scope, it would delete 
the file unless I tell it to save it. Now in my application I do get the 
attachment and save it.

The following code is on server side.
        try {
            AttachmentPart part = AxisUtil.getReqestDimeAttachment();

            FilePartProcess process = new FilePartProcess();
            result=process.saveFile(wsFile,(InputStream)part.getContent());
            part.dispose();
        } catch (Exception e) {
            throw new ResponderException(e);
        }

The method above is called by the web-service
        call.addAttachmentPart(attachmentPart);
        result = (String) call.invoke(new Object[]{wsFile});

Let me know whether I should handle it differently.

Thank you.

Sunil


> attachment temp files are not deleted
> -------------------------------------
>
>          Key: AXIS-2037
>          URL: http://issues.apache.org/jira/browse/AXIS-2037
>      Project: Axis
>         Type: Bug
>  Environment: Any Windows OS e.g XP, 2000, 2003 
>     Reporter: Sunil Sane
>  Attachments: attachmentissue.rtf
>
> When a file is sent as an AXIS attachment from client to server using web 
> service. AXIS creates temp file in the attachments directory specified in 
> server-config.wsdd
> *************************************************************************************************************************************
> First few lines of the config file ar as below:
> <?xml version="1.0" encoding="UTF-8"?>
> <deployment xmlns="http://xml.apache.org/axis/wsdd/"; 
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>  <globalConfiguration>
>   <parameter name="adminPassword" value="admin"/>
>   <parameter name="attachments.Directory" value="c:\data\\attachments"/>
>   <parameter name="sendMultiRefs" value="true"/>
>   <parameter name="sendXsiTypes" value="true"/>
>   <parameter name="attachments.implementation" 
> value="org.apache.axis.attachments.AttachmentsImpl"/>
>   <parameter name="sendXMLDeclaration" value="true"/>
>   <parameter name="axis.sendMinimizedElements" value="true"/>
> *************************************************************************************************************************************
> The file created is something like Axis<number>axis let's say Axis1111axis. 
> These files do not get removed even if the application is closed. Same thing 
> happens when you receive a file from server to client, similar file is 
> created in c:\Document and Settings\<logged user>\Local Settings\Temp 
> directory.These files also do not get deleted.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to