关于webservice得不到值,小弟求帮助解决思路

WBOY
Release: 2016-06-13 13:34:06
Original
816 people have browsed it

关于webservice得不到值,小弟求帮助
function getline(){
 $client = new SoapClient('http://www.ungb.com/sky/LineService.asmx?WSDL');  
 try { 
  $result = $client->GetListLine();
  print_r($result);
  return $result;
 }catch(SoapFault $e){
  return -1;
 }
}
?>
我通过上面的代码得到的是空值,但我用soapui测试,接口是好的,可以得到值。

这东西弄的我郁闷死,求那位兄台帮忙解决一下,谢谢了。。。。。。。。。。。。。。。。

------解决方案--------------------

PHP code

define('R_P',dirname(__FILE__)."/");
include_once(R_P.'class/nusoap/nusoap.php');

$wsdl="http://www.ungb.com/sky/LineService.asmx?WSDL";
$ParmArray=array("literal"=>"");
$client = new nusoap_client($wsdl,true);
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
$client->timeout = 900;
$client->response_timeout = 900;
$result = $client->call("GetListLine",array("parameters"=>$ParmArray));
print_r($result); <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template