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

Discussion in 'ASP .Net Web Services' started by Bob, Jul 1, 2004.

  1. Bob

    Bob Guest

    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?
     
    Bob, Jul 1, 2004
    #1
    1. Advertising

  2. i like the idea ... but it cannot be done.
    casey

    " Bob" <> wrote in message
    news:...
    > 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?
    >
    >
     
    casey chesnut, Jul 1, 2004
    #2
    1. Advertising

  3. Bob

    DalePres Guest

    How about copy and paste?

    "casey chesnut" <casey@MORE_spam_PLEASEbrains-N-brawn.com> wrote in message
    news:%...
    > i like the idea ... but it cannot be done.
    > casey
    >
    > " Bob" <> wrote in message
    > news:...
    > > 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?
    > >
    > >

    >
    >
     
    DalePres, Jul 2, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,157
  2. Monk
    Replies:
    10
    Views:
    1,501
    Michael Wojcik
    Apr 20, 2005
  3. Oltmans
    Replies:
    6
    Views:
    360
    Terry Reedy
    Mar 11, 2009
  4. Kenneth McDonald
    Replies:
    5
    Views:
    342
    Kenneth McDonald
    Sep 26, 2008
  5. Replies:
    4
    Views:
    634
    Dr John Stockton
    Jun 3, 2006
Loading...

Share This Page