By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,187 Members | 1,630 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,187 IT Pros & Developers. It's quick & easy.

ASP.Net, c# Web Service with WSE, Handle SOAP/DIME attachments

markmcgookin
Expert 100+
P: 648
Hi Folks,

Sorry if this is a bit vague, but I am REALLY struggling to find an answer to this (hopefully simple) question.

I have a web service running on a system that we are using to integrate with another system running on that box.

One of the things that I really really need is to accept a zip file from a user's system, and 2/3 strings with some details.

I am aware that we can use SOAP and DIME to attach this file to this request, and have been able to find code on MSDN to RETURN DIME attachments. But I can't seem to find any code that recieves it in the web service.

i.e.

user invokes web service by sending data and file in SOAP request and the service then goes and does things with that file then returns some data.

Can anyone help me out with how to catch and read in this file in the request?

Something like this.. but working :)

Expand|Select|Wrap|Line Numbers
  1. [WebMethod]
  2.         public string testing(string fileName)
  3.         {
  4.             string answer = "";
  5.  
  6.             if (HttpSoapContext.RequestContext.Attachments.Count > 0)
  7.             {
  8.                 answer = "Got it!";
  9.             }
  10.             else
  11.             {
  12.                 answer = "Nothing there mate...";
  13.             }
  14.             return answer;
  15.         }
  16.  
Jul 25 '08 #1
Share this Question
Share on Google+
1 Reply


markmcgookin
Expert 100+
P: 648
Is it actually possible to handle an attachment with a request and not a responce???
Jul 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.