对SOAP来说还是个新手。正在尝试从NOAA网站获取天气数据。下面显示的第一个SOAP请求有效,并返回纬度和经度。第二个SOAP请求不起作用。很明显,我没有正确发送数据。有人能帮上忙吗?谢谢
<?php
$wsdl = "http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl";
$client = new SoapClient($wsdl,array("trace"=>1,"exceptions"=>0));
$rs = $client->LatLonListZipCode(98011);
echo('<pre>'.print_r($rs,1).'</pre>');
$par=array('latitude'=>39.0000,'longitude'=>-77.0000,'product'=>'time-series','startTime'=>'2004-04-27T12:00','endTime'=>'2004-04-30T12:00','Unit'=>'e','weatherParameters'=>'maxt = TRUE');
$rs = $client->NDFDgen($par);
echo('<pre>'.print_r($rs,1).'</pre>');
?>发布于 2015-03-25 09:21:10
weatherParameters应该是一个关联数组。
https://stackoverflow.com/questions/12198350
复制相似问题