>From a protocol standpoint, the MTOM wire protocol does not carry a file
name. The fact that the data handler class carries a pathname is a bit of a
red herring. If you want to carry a file name, use another element.

It seems to me that there is some hypothetical possibility that the XOP/Mime
part could carry a file name, but I don't see a viable way to carry that
around. Similiarly, XOP could use a URL other than cid: to refer to some
other kind of resource, but I don't know if that would count as MTOM.

On Mon, Jun 9, 2008 at 3:10 PM, Glen Mazza <[EMAIL PROTECTED]> wrote:

>
> Pardon the non-answer, but for my MTOM example
> (http://www.jroller.com/gmazza/date/20071102), in step #11, I let the
> client
> set the name.  Wouldn't it seem more natural to let the client decide what
> it wants the file it obtains to be called?
>
> As an alternative, perhaps best to send a separate String element for the
> filename in the SOAP response, then your client can name the file based on
> that name.  Perhaps even a more portable solution.
>
> Glen
>
>
> Boxiong Ding wrote:
> >
> > I have a service that uses MTOM to send a image file. As a client I can
> > get the data, but the file name is lost. I have tried to set it in
> > ByteArrayDataSource.setName() and create a DataHandler using it on server
> > side. But still, the client always get null from DataSource.getName() and
> > when I use tcpmon to look at the traffic, I couldn't find the file name
> > any where.
> >
> > Is this how it works? And how can I preserver the file name?
> >
> > Thanks,
> > Boxiong
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Does-MTOM-keep-filename--tp17739479p17739632.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Reply via email to