你好复杂的参数调用Web服务,这是一类...与C#客户端
公共类身份认证 {
private string userField;
private string passwordField;
public string user
{
get
{
return this.userField;
}
set
{
this.userField = value;
}
}
public string password
{
get
{
return this.passwordField;
}
set
{
this.passwordField = value;
}
}
}
这里的Web服务:
[WebMethod]
public Vehicle[] getVehiculeList(Authentification authentification)
{
....
}
这里客户端和webservice的调用: (在web服务的相同类身份认证等已被定义)
Authentification azz = new Authentification() ;
azz.user = "toto";
azz.password = "tata";
string aa = ws.getVehiculeList(azz);
给出一个错误: 错误27“WSCL.localhost.Service1.getVehiculeList最好重载的方法匹配(WSCL.localhost.Authentification) “有一些无效参数
和
错误28参数 '1':不能从转换 'WSCL.Authentification' 到 'WSCL.localhost.Authentification'
有什么帮助吗?
非常感谢!