how to get the comments on WS methods to show up in proxy class?

B

Bob

I don't know if this is doable but sure very helpful. Is there a way to
make the XML comments or the Description attribute on the [WebMethod] on
the WS to show up in the proxy class generated by VS.NET. E.g.

/// <summary>My test web service.</summary>
/// <param name="someValue">blah blah</param>
/// <returns></returns>
[WebMethod(Description="My test web service to say hello")]
public string Hello(string someValue) {
......................
}

Here's the sync proxy method generated:

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://abcd.com/
Hello", RequestNamespace="http://abcd.com",
ResponseNamespace="http://abcd.com",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string Hello() {
object[] results = this.Invoke("Hello", new object[0]);
return ((string)(results[0]));
}

I can manually add to the <remarks> tag, but if you update the web reference
in VS.NET, it deletes whatever you edited. It's the proxy side that the
client really needs to know how to call so the comments/description is
necessary. Can it be done?
 
D

DalePres

How about copy and paste?

casey chesnut said:
i like the idea ... but it cannot be done.
casey

Bob said:
I don't know if this is doable but sure very helpful. Is there a way to
make the XML comments or the Description attribute on the [WebMethod] on
the WS to show up in the proxy class generated by VS.NET. E.g.

/// <summary>My test web service.</summary>
/// <param name="someValue">blah blah</param>
/// <returns></returns>
[WebMethod(Description="My test web service to say hello")]
public string Hello(string someValue) {
......................
}

Here's the sync proxy method generated:

/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://abcd.com/
Hello", RequestNamespace="http://abcd.com",
ResponseNamespace="http://abcd.com",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string Hello() {
object[] results = this.Invoke("Hello", new object[0]);
return ((string)(results[0]));
}

I can manually add to the <remarks> tag, but if you update the web reference
in VS.NET, it deletes whatever you edited. It's the proxy side that the
client really needs to know how to call so the comments/description is
necessary. Can it be done?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top