You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by eric johnson <ej...@gmail.com> on 2012/05/18 00:21:21 UTC

axis2 - file cache for attachments - file name?

Hi,

I've set up file caching for attachments by following these instructions:

http://axis.apache.org/axis2/java/core/docs/mtom-guide.html#a4

I need a way to programmatically know what the name of the file that was
created is so that in my web services skeleton I can process the file. How
can this be accomplished?

I have seen the files that are generated have names such as:

axiomfc4c46332e06dfee16108281aab8ab7c5f1685e8d6ea7ca8.att

Thanks,

Eric

Re: axis2 - file cache for attachments - file name?

Posted by Andreas Veithen <an...@gmail.com>.
The DataSource stored in the DataHandler that represents the
attachment is actually a FileDataSource instance and you can get the
name of the file from there. However, the fact that Axiom leaks the
file name is actually a design flaw and this will no longer be
supported in future Axis2/Axiom versions (but there will then likely
be a well defined API to convert an attachment to a file). For more
information see [1].

Andreas

[1] http://ws.apache.org/axiom/devguide/ch03.html

On Fri, May 18, 2012 at 12:21 AM, eric johnson <ej...@gmail.com> wrote:
> Hi,
>
> I've set up file caching for attachments by following these instructions:
>
> http://axis.apache.org/axis2/java/core/docs/mtom-guide.html#a4
>
> I need a way to programmatically know what the name of the file that was
> created is so that in my web services skeleton I can process the file. How
> can this be accomplished?
>
> I have seen the files that are generated have names such as:
>
> axiomfc4c46332e06dfee16108281aab8ab7c5f1685e8d6ea7ca8.att
>
> Thanks,
>
> Eric

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