好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

php SOAP WSDL简单应用实例 - php高级应用

php SOAP WSDL简单应用实例

php SOAP WSDL简单应用实例:

<?php      $ws  =  "http://www.phpfensi.com/sd/2001/TemperatureService.wsdl" ;      $zipcode  =  "23590" ;      $client  =  new  SoapClient( $ws , array ( 'trace'  => 1));      $temperature  =  $client ->getTemp( $zipcode );      //开源代码phpfensi.com       echo  htmlspecialchars( $client ->__getLastRequest());  ?> 

获取soap发送的数据,代码如下:

<?php      $ws  =  "http://www.phpfensi.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://www.phpfensi.com/sd/2001/TemperatureService.wsdl" ;      $client  =  new  SoapClient( $ws );     var_dump( $client ->__getFunctions());  ?> 

查看更多关于php SOAP WSDL简单应用实例 - php高级应用的详细内容...

  阅读:51次