Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include file name for attachment?

 
Bernhard Pauler
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I have a question regarding web services with attachments:

How can I assure that the name of the file I'm sending as an attachment is included in the transmission and can be read afterwards?

Is this possible with the DataHandler class?

Thanks for your answers,

Bernhard
 
Bernhard Pauler
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found some info...

According to the article "Fear of Attachments" by Steve Loughran (damn good title ) it is possible to send the filename with MIME inside a header, but not so with DIME. The code sample in the article passes the filenames as a separate parameter.

I'm not sure but it seems that .NET only supports DIME out of the box. I don't want to lock out .NET users. There are third party libraries though.

Bernhard
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently they are supposed to meet in the middle with MTOM
Web Services, Opaque Data, and the Attachments Problem

JAX-WS 2.0 MTOM and swaRef
MTOM in JAXWS RI 2.0 Final
Handling Binary Data with Axis2 (MTOM/SwA)

However there is the real possibility the each platform will serialize identical attachments in different ways
MTOM between Java and .NET - theoretically the other side should be able to handle it ... theoretically.
 
Bernhard Pauler
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your hint to MTOM. Will need some time to go through the provided links. Is it an adopted technique? Any hands-on experience?

Bernhard
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic