By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,335 Members | 2,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,335 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.