473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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("MyFeeR esponse",
"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("MyFeeR esponse",
"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!!

Mar 23 '06 #1
1 1907
q
FYI: .NET 2.0 fixes that critical issue. In .NET 2.0, the proxy is
properly created with public properties and private fields.

Mar 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lars Plessmann | last post by:
Problem: I try to store data in a objects field and read it out again. Sounds easy, yeah. But its a bit tricky here.... ;-) This is the class Customer.php with some setter and getter functions...
5
by: YellowDog | last post by:
I want to use a property without a private data member. This is supposed to be legal, except that I get an Stack Overflow Exception when I implicity use the set method. Here's the code: Option...
10
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this...
13
by: Adam H. Peterson | last post by:
I just made an observation and I wondered if it's generally known (or if I'm missing something). My observation is that static protected members are essentially useless, only a hint to the user. ...
3
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three...
8
by: Ethan Kennerly | last post by:
Hello, There are a lot of Python mailing lists. I hope this is an appropriate one for a question on properties. I am relatively inexperienced user of Python. I came to it to prototype...
0
by: shyamg | last post by:
Hi all i am newly add new Attribute "name" in strutshtml- tld file but its asking for setter method for attribute. where can add the setter and getter. Thanks. ss.
1
by: trullock | last post by:
Hi, I've written a custom control which needs to have several public properties. Do i have to write a viewstate getter and setter for every property, or is there some decoration (or other...
2
by: Dinsdale | last post by:
We have created a object library that implements the INotifyPropertyChanged.PropertyChanged to bubble changes up to higher level classes. For instance, we have a person class that can have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.