一聚教程网:一个值得你收藏的教程网站

热门教程

php SOAP WSDL简单应用实例

时间:2022-06-24 18:20:39 编辑:袖梨 来源:一聚教程网

php教程 SOAP WSDL简单应用实例

   $ws = "http://www.111com.net/sd/2001/TemperatureService.wsdl";
   $zipcode = "23590";
   $client = new SoapClient($ws,array('trace' => 1));
   $temperature = $client->getTemp($zipcode);
   echo htmlspecialchars($client->__getLastRequest());
?>

获取soap发送的数据

   $ws = "http://www.111com.net/sd/2001/TemperatureService.wsdl";
   $zipcode = "12312";
   $client = new SoapClient($ws,array('trace' => 1));
   $temperature = $client->getTemp($zipcode);
   echo htmlspecialchars($client->__getLastResponse());
?>

wdsl应用

   $ws = "http://www.111com.net/sd/2001/TemperatureService.wsdl";
   $client = new SoapClient($ws);
   var_dump($client->__getFunctions());
?>

热门栏目