How to use SoapDocumentMethod?

Posted on 2007-10-08
Medium Priority
Last Modified: 2013-11-18
According to MSDN:

[ SoapDocumentMethod(Action="http://www.contoso.com/Sample",

While I am looking at a sample from:


Their usage is:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:thinktecture-com:demos:restaurantservice:webservice:v1:addRestaurantIn", OneWay=true, Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Bare, Binding="RestaurantService")]

I am wondering specifically about:


Ist that just a string descripion which I could change to anything I want, or does it have to follow a structure?
Question by:directxBOB
LVL 25

Accepted Solution

dstanley9 earned 2000 total points
ID: 20036288
That constructor parameter sets the action property, which according to MSDN:

Typically, the Action property is a URI indicating the intent of the request. However, the SOAP specification places no restrictions on the format of the URI, or any rules about whether the URI is resolvable. The presence and content of the Action property can be used by Web servers, such as firewalls, to appropriately filter SOAP request messages in HTTP.

So you can't change it to _anything_ - it has to be a valid URI, but it doesn't have to resolve to anything at all.  When you create a method in VS, it uses http://tempuri.org/MethodName, where MethodName is the name of the XML Web service method.

Author Comment

ID: 20039244
So just for clarity I should have:



Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question