View Single Post
Old December 10th, 2003, 12:03 PM
planoie's Avatar
planoie planoie is offline
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

The WSDL for a web service is only going to define the data structures and web methods available. The idea of a web service is to have the web service do the work and just return data. It makes little sense to have a web service return you code. That kind of defeats the purpose of the service.

Perhaps what you are intending here is to create a property accessor. Public properties of classes will show up in the web service data structures. Set up your class like this:

public class clsName
    public string m_ID = "";
    public string m_Comment = "";
    private string m_Hide = "";

    public string methodTry() // It has not in proxy class
            return (m_Hide);

And you should end up with something like this in your proxy class:

public class clsName
    /// <remarks/>
    public string m_ID;

    /// <remarks/>
    public string m_Comment;

    /// <remarks/>
    public string methodTry;

I'm not sure what will actually happen with a readonly property in the proxy class so I might be wrong on this.

Work smarter, not harder.