Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Describing ASMX web service WebMethod parameters

This seems like a simple question, but I haven't been able to find the answer online via many Google searches. I have a C# web service and, when I visit its ASMX page in the browser, for a particular method it always has the following:

"The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values."

Likewise for SOAP 1.2 and HTTP POST. What I want to know is how I replace the placeholders shown, which are things like:

<myParameter>string</myParameter>

Where 'string' is the placeholder. And in the response:

<xsd:schema>schema</xsd:schema>xml

Where 'schema' and 'xml' are the placeholders. I've been using another web service that has these placeholders filled out with example values for the parameters and responses, and I would like to define such examples for my own web methods, too. I was able to describe the entire method with the following:

[WebMethod(Description="Does awesome things.")]

But I have not found such a thing for the individual parameters of a web method.

like image 730
Sarah Vessels Avatar asked Jul 21 '09 17:07

Sarah Vessels


People also ask

What is System Web Services WebMethod?

The WebMethod attribute is added to each method we want to expose as a Web Service. ASP.NET makes it possible to map traditional methods to Web Service operations through the System. Web. Services. WebMethod attribute and it supports a number of properties that control the behavior of the methods.

Why use WebMethod?

webMethods.io Integration enables you to automate tasks by connecting apps and services, such as Marketo, Salesforce, Evernote, and Gmail. It lets your favorite apps exchange data and talk to each other seamlessly, and eliminates the need to hire expensive developers to build your favorite integrations.

What is a Asmx Web service?

What is an ASMX file? A file with . asmx extensions is an ASP.NET Web Service file that provides communication between two objects over the internet using the Simple Object Access Protocol (SOAP). It is deployed as a service on the Windows-based Web Server to process incoming request and return the response.


1 Answers

By default DefaultWsdlHelpGenerator.aspx is called to generate the "help" page. You can set another (or modified) template with the wsdlHelpGenerator Element in your web.config file.

like image 144
VolkerK Avatar answered Oct 17 '22 02:10

VolkerK