[Mono-list] Binary attachments and Soap
jonpryor at vt.edu
Fri Dec 16 07:18:01 EST 2005
On Fri, 2005-12-16 at 13:25 +0200, Angel Gruev wrote:
> I am using web services with mono. Is there a way a web method to
> return soap message with binary attachments. In .NET there is DIME,
> implemented in WSE. But mono does not support WSE for now. Any idea
> how to deal with this problem ?
Ye olde standard "don't do that" response. :-)
Instead of binary attachments, I can think of two ways to handle this:
- Base64-encode the binary data into text and send the text.
This is fugly since Base64-encoded data is typically 1.5-2x the size
of the binary data, IIRC, and then there's the conversion overhead.
- Don't send the binary data in the SOAP message. Instead, send a
"pointer" to the binary data, such as a URL or file system location
(if your systems happen to share a network mounted filesystem).
I've actually done this at work, but we have a NAS connecting
everything together, so this might not be applicable.
A variation on this would be to have an FTP server, FTP the file
to the server, and then send the filename in the SOAP message.
Not ideal, but it can be made to work.
More information about the Mono-list