You can Google for ".net, DIME, web service" and you should be able to
find samples. But basically, in your web method, to attach a file, it's
just:
DimeAttachment objAttachment;
objAttachment = new
DimeAttachment("application/unknown", TypeFormat.MediaType,
"blah.blah");
ResponseSoapContext.Current.Attachments.Add(objAttachment);
To get a file, it's
AttachmentCollection objAttachments =
RequestSoapContext.Current.Attachments;
if(objAttachments != null) {
foreach(DimeAttachment objAttachment in objAttachments) {
byte[] data = new byte[objAttachment.Stream.Length];
objAttachment.Stream.Read(data, 0, (int)
objAttachment.Stream.Length);
System.IO.FileStream objFile = System.IO.File.Create("whatitis.foo");
objFile.Write(data, 0, data.Length);
objFile.Close();
}
}
Hope this helps...