Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2006

Tip: Looking for answers? Try searching our database.

C# webservices proxy generates public member variables and no getter/setter methods??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 24 Mar 2006 00:47 GMT
I generate C# webservices proxy code from WSDL file, it turns out the
classes
generated have public member variables and no getter/setter methods as
follows,
and I am able to get data when running the client.

   [System.Xml.Serialization.SoapTypeAttribute("MyFeeResponse",
"http://data.myproj.wws")]
   public class MyFeeResponse {

       /// <remarks/>
       public string feeTranSequenceNumber;

       /// <remarks/>
       public string tranNumber;
   }

However, if I add the getter/setter methods, and changed the public
modifier to
private modifier, I couldn't get data when running the client.

   [System.Xml.Serialization.SoapTypeAttribute("MyFeeResponse",
"http://data.myproj.wws")]
   public class MyFeeResponse {

       /// <remarks/>
       private string feeTranSequenceNumber;

       /// <remarks/>
       private string tranNumber;

          public string FeeTranSequenceNumber
    {
        get
        {    return feeTranSequenceNumber;
        }
        set
        {    feeTranSequenceNumber = value;
        }
    }

          public string TranNumber
    {
        get
        {    return tranNumber;
        }
        set
        {    tranNumber = value;
        }
    }

   }
   
any ideas?

please advise. thanks!!
q - 24 Mar 2006 03:50 GMT
FYI: .NET 2.0 fixes that critical issue.  In .NET 2.0, the proxy is
properly created with public properties and private fields.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.