php利用soap实现调用获取返回信息的代码实例
时间:2011-04-29 来源:志向不在北京
php利用soap实现调用获取返回信息的代码实例
trace soap message
获取 soap返回信息
<?php
$ws = "http://www.3ppt.com/sd/2001/temperatureservice.wsdl";
$zipcode = "23590";
$client = new soapclient($ws,array('trace' => 1));
$temperature = $client->gettemp($zipcode);
echo htmlspecialchars($client->__getlastrequest());
?>
得到函数原型从wsdl
<?php
$ws = "http://www.3ppt.com/sd/2001/temperatureservice.wsdl";
$client = new soapclient($ws);
var_dump($client->__getfunctions());
?>
$ws = "http://www.3ppt.com/sd/2001/temperatureservice.wsdl";
$zipcode = "12312";
$client = new soapclient($ws,array('trace' => 1));
$temperature = $client->gettemp($zipcode);
echo htmlspecialchars($client->__getlastresponse());
?>
相关阅读 更多 +