Warren  P
Warren P

Reputation: 69082

How do I create a simple SOAP server using C# in Visual Studio 2010?

I was trying to follow the instructions here but they seem to quickly be getting very specific to Sharepoint, as they go along further. I just want a general tutorial for creating a non-sharepoint SOAP starter projects, and Google is not my friend, at the moment.

It seems that some of the above steps are applicable.

So far I have:

  1. A solution 'WebSite1' created with File -> New Website.
  2. A 'ClassLibrary1' project in C#, with System.Web.Services added to References.
  3. a key02.snk (strongname key file) file node in the classlibrary1.
  4. No code implementing any SOAP server methods yet.
  5. No idea how to add code to the above, and then build and run, and have a soap hello-world type method.

I'd like to implement a simple HelloWorld method that takes at least one parameter. The resulting service could be queried for its WSDL with a url like this:

    http[s]://localhost/myfirstsoapserver/helloWorldMethod1.asmx?WSDL

If my guess above is right, the above Url would be usable by any tool that can import WSDL.

My goal is rapid prototyping and mocking up of various other SOAP interfaces that I need to deal with, and I'm hoping that C#+visualStudio2010+IIS is a reasonably easy way to do that.

Upvotes: 4

Views: 23737

Answers (2)

Felice Pollano
Felice Pollano

Reputation: 33272

First create a new project as a web application: enter image description here

Then add a new item of type web service: enter image description here

Upvotes: 7

twaggs
twaggs

Reputation: 3743

Have you considered using WCF?: http://msdn.microsoft.com/en-us/library/bb386386.aspx

Upvotes: 3

Related Questions