访问 php Web 服务时出现此错误
System.Web.Services.Protocols.SoapHeaderException:SOAP 错误:编码:对象在 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage 消息,WebResponse 响应,流 responseStream,布尔 asyncCall)处没有“available_credit”属性System.Web.Services.Protocols.SoapHttpClientProtocol.InvokeAsyncCallback(IAsyncResult 结果)
使用的代码:
private void button1_Click(object sender, EventArgs e)
{
try
{
virtualrechargeService vr = new virtualrechargeService();
vr.GetBalanceInfoCompleted += new GetBalanceInfoCompletedEventHandler(vr_GetBalanceInfoCompleted);
vr.GetBalanceInfoAsync("asikcse");
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
void vr_GetBalanceInfoCompleted(object sender,GetBalanceInfoCompletedEventArgs ev)
{
try
{
Console.WriteLine(ev.Error.ToString());
Console.WriteLine(ev.Result.client_user_id);
//MessageBox.Show(ev.Result.client_user_id);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}