b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

soapclient调用webservice接口

电脑杂谈  发布时间:2016-05-23 09:02:10  来源:网络整理

你是否正在寻找关于soapclient的内容?让我把最高级的东西奉献给你:

<?php

header('Content-Type: text/html; charset=UTF-8');

$client = new soapclient('http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx?WSDL');

$parm=array('mobileCode'=>'13782149159','userID'=>'');

$result=$client->getMobileCodeInfo($parm);

$result=get_object_vars($result); //将stdclass object转换为array,这个比较重要了

echo "你的手机卡信息:".$result['getMobileCodeInfoResult'];

?>


function soapclient($para)
{
global $soap_server;
global $db,$tablepre;
try
{
$client = new soapclient($soap_server);
$client->decode_utf8=false;
$client->xml_encoding='utf-8';
$parameters = array('datacontext' => $para);
$result = $client->Commnuication($parameters);
$response = get_object_vars($result);
$response = $response['CommnuicationResult'];

//$sql = "insert into {$tablepre}soaplogs(soaptype,request,response,dateline,requestip) values('client','".addslashes($para)."','".addslashes($response)."','".time()."','$soap_server')";
//$db->query($sql);
unset($client);
return $result;
}
catch (SoapFault $fault)
{
$array = array("Error"=> $fault->faultcode,"String" => $fault->faultstring);
return $array;
}
}

以上就是关于soapclient的全部内容,相信你一定会非常满意,。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-5994-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 矢薙直树
        矢薙直树

        未从官方渠道购买怎么能说我们小米是不合格的呢

      • 许创建
        许创建

        飞机伴飞太远

      热点图片
      拼命载入中...