php SOAP WSDL简单应用示例
php SOAP WSDL简单应用实例:
<?php
$ws = "http://http://www.zjjv.com///sd/2001/TemperatureService.wsdl";
$zipcode = "23590";
$client = new SoapClient($ws,array('trace' => 1));
$temperature = $client->getTemp($zipcode);
//开源代码Cuoxin.com
echo htmlspecialchars($client->__getLastRequest());
?>
获取soap发送的数据,代码如下:
<?php
$ws = "http://http://www.zjjv.com///sd/2001/TemperatureService.wsdl";
$zipcode = "12312";
$client = new SoapClient($ws,array('trace' => 1));
$temperature = $client->getTemp($zipcode);
echo htmlspecialchars($client->__getLastResponse());
?>
wdsl应用,代码如下:
<?php
$ws = "http://http://www.zjjv.com///sd/2001/TemperatureService.wsdl";
$client = new SoapClient($ws);
var_dump($client->__getFunctions());
?>
【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。