How to use SoapDocumentMethod?

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

[ SoapDocumentMethod(Action="",

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

    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, where MethodName is the name of the XML Web service method.

    Author Comment

    So just for clarity I should have:


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
    I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
    The viewer will learn how to dynamically set the form action using jQuery.
    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…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    27 Experts available now in Live!

    Get 1:1 Help Now