axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject Re: Naming of MTOM cached attachment files
Date Tue, 19 Dec 2006 19:04:11 GMT
Hi,
Actually the temp directory is meant for Axis2 internal use.  Also
only the attachments which are larger than the file size threshold
will get stored there...

But u can manipulate those files in the following way by adding some
code to the business logic.. (Make sure to make the file size
threshold 0)..

DataHandler dataHandler = (DataHandler)omText.getDataHandler();
// You can check the data source type for added safety
FileDataSource fileDataSource = (FileDataSource)dataHandler.getDataSource();
File file = fileDataSource.getFile();
//Rename to your desired file name
file.renameTo(new File("MyFile.bin"));

Thanks,
Thilina

On 12/19/06, Brian Bacsu <bbacsu@csc.com> wrote:
>
> Hi
>
> I am using the cache feature of Axis2 1.1 for very large MTOM attachments in
> a client component. Currently the files are being saved into the defined
> temporary directory with a naming format similar to "Axis28105.att,
> Axis28106.att, etc.  This naming convention makes it very difficult to
> identify which file was placed in the temp directory by which user, so that
> the file can be retrieved and the temp directory cleaned up.  I am wondering
> how/where these names are constructed?
>
> Is there any method to control the naming of the cached file, or to obtain
> the name that will be used during the processing of the MTOM response?
>
>
>
> Thanks,
>
>  Brian Bacsu
>


-- 
Thilina Gunarathne
WSO2, Inc.; http://www.wso2.com/
Home page: http://webservices.apache.org/~thilina/
Blog: http://thilinag.blogspot.com/

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


Mime
View raw message