我从互联网上收集到我应该能够使用以下 PHP 请求预测数据:
$wsdl = "http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl";
$params = array(
"latitude" => 43.4685,
"longitude" => 89.7415,
"product" => "glance",
"startTime" => "",
"endTime" => "",
"Unit" => "e",
"weatherParameters" => array(
"maxt" => TRUE
)
);
$client = new SoapClient($wsdl);
$result = $client->NDFDgen($params);
但是,我收到服务器错误:“未捕获的 SoapFault 异常:[SERVER] 产品需要是时间序列或一目了然......”
我将参数“glance”作为上面的字符串提供,所以我不知道我做错了什么。NDFDgen 函数的文档在此处以表格形式提供。如果有人能发现我的错误,请帮助我。谢谢!