<?php
header ( "Content-Type: text/html; charset=gb2312" );
$ws = "服务的地址
$client = new SoapClient ($ws);
echo ("SOAP服务器提供的开放函数:");
echo ('<pre>');
var_dump ( $client->__getFunctions ()
);//获取服务器上提供的方法
echo ('</pre>');
echo ("SOAP服务器提供的Type:");
echo ('<pre>');
var_dump ( $client->__getTypes ()
);//获取服务器上数据类型
echo ('</pre>');
echo ("执行GetGUIDNode的结果:");
$result=$client->getWeather(array('CityName'=>'zhengzhou','CountryName'=>'china'));//查询中国郑州的天气,返回的是一个结构体
echo $result->GetWeatherResult;//显示结果
?>
![](http://simg.sinajs.cn/blog7style/images/special/1265.gif)
![](http://sina.allyes.com/main/adfclick?db=sina&bid=204720,470173,475454&cid=0,0,0&sid=474001&advid=358&camid=37389&show=ignore&url=http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif?t=3)