.net代码:
public string AddPhoneNum(string sid,string phone) { string ret = ""; string sql = "insert into CallPhone values('{0}','{1}')"; sql = string.Format(sql,sid, phone); int effect = (int)SQLHelper.ExecuteNonQuery(sql); if (effect != 1) { ret = "失败"; } else { ret = "成功"; } return ret; }
php代码:
$client=new SoapClient("http://192.168.1.150/webtest/service.asmx?WSDl"); try { $result= $client->AddPhoneNum(array('sid'=>$sid,'phone'=>$caller)); }
.net 本身调用此webservice 没有任何问题,PHP调用后存入SQL的值是空