求助!!!php调用webservice出错!
现在的返回信息是
错误 :wsdl error: phpType is struct, but value is not an array: see debug output for details
请问高手如何解决!php调用webservice这两天刚研究。不是很懂!
------解决方案--------------------
$client = new soapclient('http://www.tuc365.cn/SPINTERFACE.asmx?wsdl', true);
$fromcity=$_POST[txtCity]; //出发城市
$tocity=$_POST[txtCity0]; //抵达城市
$fromdate=$_POST[fromdate]; //出发时间
$roles=$_POST[roles]; //是否返回
$returnDate=$_POST[returnDate]; //返回时间
$userName=$_POST[username]; //用户名
$clientName=$_POST[clientName]; //乘客姓名
$clientCardId=$_POST[clientCardid]; //乘客证件号
$clientPhone=$_POST[clientPhone]; //乘客电话
$clientType=$_POST[clientType]; //乘客类型
$webname="51pingo.com"; //网站名称
$filghtId=$_POST[$filghtId]; //航班id
$linkName=$_POST[txtLinkManName]; //联系人姓名
$linkPhone=$_POST[txtLinkManPhone]; //联系人电话
$linkAddress=$_POST[txtLinkManAddress]; //联系人电话
$linkEmail=$_POST[txtLinkManEmail]; //联系人email
$webOrderId=date("YmdHis"); //生成订单号
$webUserName="tuc365";
$webmd5="tuc365";
$orderInfo=array($fromcity,$tocity,$fromdate,$roles,$returnDate,$userName,$clientName,$clientCardId,$clientPhone,$clientType,$webname,$filghtId,$linkName,$linkPhone,$linkAddress,$linkEmail,$webOrderId,$webUserName,$webmd5);
$str=$client->call('AddOrders',$orderInfo);
if (!$err=$client->getError()) {
echo "程序返回:",htmlentities($str,ENT_QUOTES);
} else {
echo "错误 :",htmlentities($err,ENT_QUOTES);
}
登录后复制
现在的返回信息是
错误 :wsdl error: phpType is struct, but value is not an array: see debug output for details
请问高手如何解决!php调用webservice这两天刚研究。不是很懂!
------解决方案--------------------
$client = new SoapClient('http://www.tuc365.cn/SPINTERFACE.asmx?wsdl');
//GetFlight
$aData = array('webName'=>'','webUserName'=>'','webmd5'=>'tuc365');
$aResult = $client->__call('GetFlight',$aData);
//AddOrders
/*$aData = array(
"fromCity"=>"",
"toCity"=>"",
"fromDate"=>"",
"returnDate"=>"",
"roles"=>"",
"userName"=>"",
"clientName"=>"",
"clientCardId"=>"",
"clientPhone"=>"",
"clientType"=>"",
"webName"=>"",
"flightId"=>"",
"linkName"=>"",
"linkPhone"=>"",
"linkAddress"=>"",
09-16 05:27