Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Description for Webservice parameters

Is it possible to create a description for parameters used in an (asmx)-webservice? I know I can set the description of the webmethod with the Description-property. However is it also possible to add an attribute to the parameter to create description in the webservice for a given parameter

[WebMethod(Description = @"Get all approved friends <br /> 
    where rownum >= StartPage * count AND rownum < (StartPage+1) * count")]
public Friend[] GetFriendsPaged(int startPage, int count){...}

For instance in the example given above, I would like to add documentation that the StartPage is 0-based.

Thanks in advance

like image 790
Ruben Avatar asked Dec 30 '25 07:12

Ruben


2 Answers

There is no way to do this, and no standard for what to do with the information even if you could add it. It's true that a WSDL may contain annotations for any element, but there's no standard about, for instance, placing those annotations into comments in the generated proxy class.

like image 103
John Saunders Avatar answered Dec 31 '25 20:12

John Saunders


I can't find any way of doing it. I guess you'd have to put the text into the Webmethod's description.

like image 34
Mladen Mihajlovic Avatar answered Dec 31 '25 22:12

Mladen Mihajlovic