?
Solved

How to use SoapDocumentMethod?

Posted on 2007-10-08
2
Medium Priority
?
3,708 Views
Last Modified: 2013-11-18
According to MSDN:

[ SoapDocumentMethod(Action="http://www.contoso.com/Sample",
           RequestNamespace="http://www.contoso.com/Request",
           RequestElementName="GetUserNameRequest",
           ResponseNamespace="http://www.contoso.com/Response",
           ResponseElementName="GetUserNameResponse")]

While I am looking at a sample from:

http://www.thinktecture.com/resourcearchive/tools-and-software/wscf/wscf-walkthrough

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:

"urn:thinktecture-com:demos:restaurantservice:webservice:v1:addRestaurantIn"

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

Accepted Solution

by:
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.
0
 

Author Comment

by:directxBOB
ID: 20039244
So just for clarity I should have:

http://mydomain.org/MyMethodName

?
0

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