.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to create a WCF service that is in compliance with Soap Messages with Attachments

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :SharePoint
Hi, I know that there are many ways to send attachments, but unfortunately i need to create a webservice that follows the "SOAP messages with Attachments" specification (http://www.w3.org/TR/SOAP-attachments). This specification can be sumarrizing as and Multipart MIME message that groups a Soap Envelope and more files as attachmens in differnent MIME parts, such as SOAP with Attachments MIME envelope -Root Body MIME part --Soap Envelope ---Soap Header ---Soap Body - Mime Part 2 --First File - Mime part 3 --Second File .... Hopefully that structure can be helpful,otherwise you can easily check in the specification page. I don't know how to do that: - Creating a Contract with one parameter that will a Message that will encapsules all the information, but this means that I need to create all the MIME parts manually. and lqater in the client I'll have to split the information and deserialized in objects. Any help would be great, Thanks in advance for your help. Cheers

View Complete Post

More Related Resource Links

DIME: Sending Files, Attachments, and SOAP Messages Via Direct Internet Message Encapsulation


Direct Internet Message Encapsulation (DIME) is a new specification for sending and receiving SOAP messages along with additional attachments, like binary files, XML fragments, and even other SOAP messages, using standard transport protocols like HTTP. In this article, the author explains what DIME is and how it differs from MIME encapsulation. A detailed description of the message format and how it is parsed, as well as working with SOAP and extending it with WSDL, is also included.

Jeannine Hall Gailey

MSDN Magazine December 2002

.Net Frameword 4 SOAP Web Service



We want to upgrade from VS2005 to VS2010. Before we do that, I would like some clarity about some things.


Can we build typical SOAP webservices with the 4 Framework as I could with 2.0?


Would a WCF Service allow me to have both REST/SOAP services in one application?


Is Framework 4 ONLY for REST services and I need to stick to 3.5 for SOAP?


I downloaded the free Web Developer 2010, but I cannot seem to get anywhere trying to figure this out.


Thanks for any input.





Service Station: WSE 3.0, SOAP Transports, and More


It's that time again. Time to answer some of the questions I get on a regular basis. This month I'll look at service orientation and policy-based compatibility, SOAP's transport-neutral design, and Web Services Enhancements (WSE) 3.0.

Aaron Skonnard

MSDN Magazine June 2006

MSMQ and .NET: Send MSMQ Messages Securely Across the Internet with HTTP and SOAP


When creating a distributed system you frequently need to provide for communication between two entities that are not in sync. Microsoft Message Queue Server (MSMQ) provides the kind of store-and-forward messaging in a pre-built infrastructure that can help you address these kinds of messaging needs. In the past, MSMQ was accessed using a COM wrapper. Now there's a .NET wrapper that lets you accomplish your messaging goals easily from your Framework-based code. To illustrate the use of the wrapper, the author builds a messaging application, sends MSMQ messages over the Web, and discusses messaging security.

David S. Platt

MSDN Magazine December 2003

House of Web Services: Accessing Raw SOAP Messages in ASP.NET Web Services


Web Services exchange XML messages. Most of today's Web Service toolkits do their best to hide this fact from developers, by exposing a Web Service's behavior as method invocations against objects instead.

Tim Ewald

MSDN Magazine March 2003

Develop a Web Service: Up and Running with the SOAP Toolkit for Visual Studio


The new Simple Object Access Protocol (SOAP) Toolkit for Visual Studio 6.0 provides the infrastructure for developers to build, expose, and consume Web services. With a few exceptions that are outlined in the toolkit, the SOAP Toolkit complies with the SOAP version 1.1 specification. It includes the Remote Object Proxy Engine (ROPE), a Service Description and Code Generation Wizard, and code that provides ASP and ISAPI reference implementations of SOAP listeners. This article describes the tools and the object model of the SOAP Toolkit, and then demonstrates ASP and ISAPI implementations of a functional Web service using this toolkit.

Rob Caron

MSDN Magazine August 2000

web service soap mapper error question

Hi,I'm trying to connect to a web service using excel.I have currently no issues logging into the web service, and running one of the other functions to fetch a full list of data.  Once I am able to log in, the function returns a token, which I use to fetch data.But Currently, I'm getting the following errors one two of the functions:SoapMapper:Restoring data into SoapMapper ViewListResult failed HRESULT=0x80020009: Exception occurred. - Client:Unspecified client error. HRESULT=0x80020009: Exception occurred.Run-time error '-2147221504 (80040000)':SoapMapper:Restoring data into SoapMapper ViewListResult failedAny idea why I might be getting this error?  And also how I can fix it?  Thanks.

Full SOAP envelope in WCF service log

Hello, I've enabled all the wcf tracing features but I cannot see the SOAP generated for my incoming/outgoing message (on net.tcp protocol binding). This is my configuration:   <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="All" propagateActivity="true"> <listeners> <add name="wcf" /> </listeners> </source> <source name="System.IdentityModel"> <listeners> <add name="wcf" /> </listeners> </source> <source name="System.MessageLogging"> <listeners> <add name="wcf" /> </listeners> </source> <source name="System.Runtime.Serialization"> <listeners> <add name="wcf" /> </listeners> </source> </sources> <sharedListeners> <add name="wcf" type="System.Diagnostics.XmlWriterTraceListener" initializeData="wcf.svclog" /> </sharedListeners> </system.diagnostics>   .... and ....   <diagnostics> <messageLogging logEntireMessage = "true" logMalformedMessages = "true" logMessagesAtS

How to create simple web service in VS2010, NOT WCF service

How to create simple web service in VS2010 Professional (trial version). There is no template to do this.  I am not trying to create WCF service here.

Get the error 'The Workstation service has not been started' when trying to create a new content d

I am running SharePoint on a standalone machine, and the workstation service is up and running. Restarting the service makes no difference. Rebooting the machine hasn't helped either. No errors are being written to the event log.

FaultContract - can I use non soap fault messages

I want to use the FaultContract functionality for reporting errors but I want to completely define the message on the wire (as I do in the MessageContract) - I do NOT want the message to appear as a soap fault on the wire.  Is that possible?  I guess what I really want is for a contract to have two possible results, the normal successful result and a specialist exception result.  This is for something to go through an XML guard and a soap fault doesn't meet the IDL spec.   I'd be grateful for any pointers   Thanks

How to create WEB SERVICE

HI ALL, I have to create web service from which i do want to call SSIS package ,Kindly suggest.   Amit 

Seeing the SOAP request sent from a Web Service Client/Consumer

Hello, I am building a web service consumer in C# in VS2010.  Using the provided WSDL, I need to build appropriate headers and use certificates, SSL (user name & pass), & WS security.  I am getting an error from the webservice side, specifically processing the <wsse:Security> header. Is it possible for me to see the exact request I am sending to the Webservice? I'd like to see the values of the pieces of the header that get put in and such. Is it possible to have human readable serialization of what's being passed in right before the error? Thank You

Create a new process in web service using delegated impersonation context

Hi, I've written an ASP.NET 2.0 web service which is consumed by a web application which goes out and gets configuration data back from newly built win2k3 servers in a large enterprise. I am using kerberos delegation and impersonation to pass through the users domain admin rights to interrogate the server which has just been built. The web pool identity (IIS 6.0) runs under a low priviledge service account. I have all the delegation part working ok. The problem I am having is that I want to programmatically kick off a process which executes a cmd line executable and redirects the output, all under the context of the user who's being impersonated. I understand that the process will be external to the impersonated thread, so will end up running under the worker process identity, which is why I'm getting an "access is denied" message. I've been reading about the CreateProcessAsUser and createprocesswithlogonw API functions but all I've seen is examples where people specifically state the username and password in their code. This is not something I can do as the environment is very secure, so what I need to do is seamlessly get the identity of the impersonated user, and some how feed that into a function which will create the process under the correct domain admins identity and feed back out the StdOuput. Is this something that can be achieved, and if so, how? Man

how to create a doc library item using web service

Hi, I think this is a common question, but I coulnd't come up with anything at this point. I'd like to create an item in a document library using SP web service. - no uploading a file. I have created an item using ../copy.asmx web service. Using the WS function(copyWebService.CopyIntoItems function), it seems suitable to create an item AND at the same time to upload a file. I don't think I can just create an item with this function. How do i just create an item? any reply is appreciated.  

Web Service ParserError Could not create type

Getting error message with our web service: Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not create type 'ATGIntegration.B2CBlueprintOMSIntegrationWSBinding'. Source Error: Line 1: <%@ WebService Language="vb" CodeBehind="Service.asmx.vb" Class="ATGIntegration.B2CBlueprintOMSIntegrationWSBinding" %>   Two versions of this web service installed on a server (one for development) with the only difference being the web.config file. Web service worked without error for over a year. Recently made some changes to the code, compiled and copy and pasted bin files to the bin folder for the development web service. Then this error appeared. Then I put back the original bin files but same error. At this time the live web service was still working. Later I copied bin folder from live to dev and that broke live. I can fix this error by rebooting the machine, accessing the web service in error, making any change to the web.config file and finally accessing the web service again. The problem is that this error re-appears after a random period of time for no obvious reason. I follow the process again to fix. I have done this process 8 times now. Both dev

Create a new target application - Secure Store Service administration issues

Hi,I am trying to create new target application, when I go to Secure Store Service in Centra admin I have:Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator.I have used this few days ago and avarything else is working fine on the server, and I have applications created with it running fine.Any help is appreciated.cheersValko
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend