开发者社区 问答 正文

PHP中关于SOAP问题

<?php
$objSoapClient = new SoapClient("http://system.4haiyou.com/Merchant/Order.asmx?WSDL");
$pwd = 'e10adc3949ba59abbe56e057f20f883e';
try{
$param = array('userName'=>'jerry@163.com',
'password'=>$pwd,
'Address1'=>'Baoan',
'Address2'=>'mingyou',
'City'=>'Shenzhen',
'ContactName'=>'Zhangjunwen',
'Country'=>'CN',
'OrderLine'=>'test',
'OrderNumber'=>'11111111',
'Phone'=>'111111111',
'Province'=>'Guangdong',
'ShippingFee'=>'',
'ShippingType'=>'',
'Status'=>'',
'TrackingNumber'=>'',
'Value'=>'',
'Zipcode'=>'',
'GuaranteePrice'=>''
); 
$out = $objSoapClient->AddOrder($param);
$data = $out->AddOrderResult;
echo $data->ACK;
echo '
';
}catch(SoapFault $e){
print $e->getMessage();
}
?>

以上代码执行 无报错 也无返回信息, 不知道 这样写 代码错了没,新手求帮助!求帮助!求帮助!求帮助!

展开
收起
小旋风柴进 2016-03-06 12:52:47 2164 分享
分享
版权
举报
1 条回答
写回答
取消 提交回答
  • 应该有提交的方法名的,然后

    $response = $client->__call("functionName",$param);
    var_dump($response);
    2019-07-17 18:54:22 举报
    赞同 评论

    评论

    全部评论 (0)

    登录后可评论
问答标签:
问答地址: