首頁 >php教程 >php手册 >php soap 调用获取返回信息

php soap 调用获取返回信息

WBOY
WBOY原創
2016-05-25 16:43:111070瀏覽

php soap 调用获取返回信息,trace soap message,获取 soap返回信息,代码如下:

<?php 
   $ws = "http://www.phprm.com/sd/2001/temperatureservice.wsdl"; 
   $zipcode = "23590"; 
   $client = new soapclient($ws,array(&#39;trace&#39; => 1)); 
   $temperature = $client->gettemp($zipcode); 
   echo htmlspecialchars($client->__getlastrequest()); 
?>

得到函数原型从wsd,代码如下:

<?php 
   $ws = "http://www.www.phprm.com/sd/2001/temperatureservice.wsdl"; 
   $client = new soapclient($ws); 
   var_dump($client->__getfunctions()); 
?>
<?php 
   $ws = "http://www.phprm.com/sd/2001/temperatureservice.wsdl"; 
   $zipcode = "12312"; 
   $client = new soapclient($ws,array(&#39;trace&#39; => 1)); 
   $temperature = $client->gettemp($zipcode); 
   echo htmlspecialchars($client->__getlastresponse()); 
?>


本文地址:

转载随意,但请附上文章地址:-)

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn