473,802 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

markmcgookin
648 Recognized Expert Contributor
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
1 3307
markmcgookin
648 Recognized Expert Contributor
Is it actually possible to handle an attachment with a request and not a responce???
Jul 28 '08 #2

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

Similar topics

1
3553
by: David Specht | last post by:
I'm having a problem with generating a proxy class for the Amazon Web Service for Merchant Integration. Per their instructions I installed WSE 2.0 and referenced the dime version of their web service. Using VS 2003 I end up with a missing location property for their ReferencedBinary object. When I use the command line tool wsewsdl2.exe I get the following message.
2
2155
by: Bernard D | last post by:
Someone here wrote that MS has dropped its commitment to DIME (see link below). I could not find any other info on this from googling around. Has MS made this public anywhere? Links would be appreaciated. And, if DIME is to be dropped, what will be used instead for file attachments with SOAP? I know about encoding everything in base64 but this is a very inneficient method for large attachments. ...
1
1398
by: Ipsita | last post by:
Hi! I am trying SOAP with DIME attachments in web services. For example say, I have a file resume.pdf stored somewhere on my server. How does the web service send the file to the client, so that the client can store it and also read from it. I am trying out with C# and ASP.NET. Is there any sample code which will help me? Please help me in this matter.
6
3099
by: ad | last post by:
I have a compressed file in client. How could we send this compressed file (.zip) to server by web service?
3
3295
by: flo | last post by:
hi, i have to develop a web service client (must be .net, currently i'm using c# with wse3) for a java service. the java service uses mime attachments for up- and download of files. i googled around for mime support in .net and only saw "don't do it" ;) (apparently even dime is not possibly in wse3?) so, is there any possibility to use mime attachments? (i thought about
0
961
by: mercury529 | last post by:
Hello everyone. Currently the only version of Visual Studio I own is VS6. I have developed a Web Service using VC++ 6 and the Soap Toolkit 3 Microsoft deployed prior to the .NET Web Service support. It has since been deprecated. I cannot afford to get a newer version of Visual Studio currently, so I am stuck for the moment using VS6. The client is a c++ application that connects via the low level connection technique described in the...
1
2176
by: blackjack2150 | last post by:
Hi. I use WSE 2.0 to call a web service method which returns some attachments together with the response. The web service can send it's attachments using either MIME format(widely used in the java world, which has no support in .net) or DIME(a Microsoft standard supported in WSE 2.0). In order for the web service to know which standard will be uses, any request to this method must contain the "Accept: application/dime" in the HTTP...
0
1082
by: =?Utf-8?B?SGVscCBOZWVkZWQ=?= | last post by:
Hi, I am sending mail attachments thru SOAP. I am using "RequestSoapContext.Attachments.Add"; everything is working fine, but How can I set the FileName for the attachments. When I set my file name to "ID" of "Microsoft.Web.Services2.Dime.DimeAttachment", attachments are sent with same ID but "tmp<RandomNumber>.tmp" (eg., tmpBA2.tmp) is added before ID as part of file name (eg., tmpBA2.tmp.MyFileName.pdf). How to overcome this.
1
8662
by: compurhythms | last post by:
I'm having an issue calling a java-based web service from a C#/.NET 2.0 client that uses WSE 3.0. (No WCF) There is an operation on the web service that takes a single base64 encoded parameter that is transported as a MTOM mime part in a multipart request. The web service provider has sent me a trace of a successful SOAP request and I have traced my SOAP request and I do not see any differences other than differences in how the...
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.