当前位置:Gxlcms > PHP教程 > php调用soap接口出报错

php调用soap接口出报错

时间:2021-07-01 10:21:17 帮助过:13人阅读

SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://27.148.153.106:9090/mpserver/services/CykProcService' : Extra content at the end of the document in /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php:47 Stack trace: #0 /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php

上面是报错

$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService");
print_r($client->__getFunctions());

上面是我的代码,下面是wsdl





   

      

   

   

      

      

      

      

   

   

      

         

         

      

   

   

      

      

         

         

            

         

         

            

         

      

   

   

      

         

      

   


上回有一次调用他们的http接口,也是设置了header才可以(代码见下方),不知道这个soap怎样设置

$ch = curl_init();
curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据
    'content-type: text/html'
));

回复内容:

SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://27.148.153.106:9090/mpserver/services/CykProcService' : Extra content at the end of the document in /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php:47 Stack trace: #0 /Users/haua/Desktop/zuji_web/www/quan.189go.cn/test2.php

上面是报错

$client = new SoapClient("http://27.148.153.106:9090/mpserver/services/CykProcService");
print_r($client->__getFunctions());

上面是我的代码,下面是wsdl





   

      

   

   

      

      

      

      

   

   

      

         

         

      

   

   

      

      

         

         

            

         

         

            

         

      

   

   

      

         

      

   


上回有一次调用他们的http接口,也是设置了header才可以(代码见下方),不知道这个soap怎样设置

$ch = curl_init();
curl_setopt ( $ch, CURLOPT_HTTPHEADER, array (//不知道为什么一定要这个他们才能接收到post数据
    'content-type: text/html'
));

人气教程排行