You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sunil Sane (JIRA)" <ax...@ws.apache.org> on 2005/06/03 20:32:00 UTC

[jira] Created: (AXIS-2037) attachment temp files are not deleted

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


[jira] Commented: (AXIS-2037) attachment temp files are not deleted

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2037?page=comments#action_12312544 ] 

Tom Jordahl commented on AXIS-2037:
-----------------------------------

How do you suggest that Axis clean up these files?
It is the responsiblity of the service or the client to remove the attachements when it has processed them.


> 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


[jira] Commented: (AXIS-2037) attachment temp files are not deleted

Posted by "Sunil Sane (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2037?page=comments#action_12312562 ] 

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

Tom,

I tried to clear the attachment this way

        attachmentPart.clearContent();
        attachmentPart.dispose();
        call.clearOperation();

both at client and server end. Nothing worked. 

Do you think there is a better way available?

> 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


[jira] Updated: (AXIS-2037) attachment temp files are not deleted

Posted by "Sunil Sane (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2037?page=all ]

Sunil Sane updated AXIS-2037:
-----------------------------

    Attachment: attachmentissue.rtf

> 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


[jira] Commented: (AXIS-2037) attachment temp files are not deleted

Posted by "Sunil Sane (JIRA)" <ax...@ws.apache.org>.
    [ 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