• <i id='SZT8P'><tr id='SZT8P'><dt id='SZT8P'><q id='SZT8P'><span id='SZT8P'><b id='SZT8P'><form id='SZT8P'><ins id='SZT8P'></ins><ul id='SZT8P'></ul><sub id='SZT8P'></sub></form><legend id='SZT8P'></legend><bdo id='SZT8P'><pre id='SZT8P'><center id='SZT8P'></center></pre></bdo></b><th id='SZT8P'></th></span></q></dt></tr></i><div id='SZT8P'><tfoot id='SZT8P'></tfoot><dl id='SZT8P'><fieldset id='SZT8P'></fieldset></dl></div>
      <tfoot id='SZT8P'></tfoot>

      <small id='SZT8P'></small><noframes id='SZT8P'>

      <legend id='SZT8P'><style id='SZT8P'><dir id='SZT8P'><q id='SZT8P'></q></dir></style></legend>
      • <bdo id='SZT8P'></bdo><ul id='SZT8P'></ul>

        PHP SoapClient 请求:不是此服务的有效方法

        时间:2023-05-22
          <bdo id='ltqBd'></bdo><ul id='ltqBd'></ul>

          1. <i id='ltqBd'><tr id='ltqBd'><dt id='ltqBd'><q id='ltqBd'><span id='ltqBd'><b id='ltqBd'><form id='ltqBd'><ins id='ltqBd'></ins><ul id='ltqBd'></ul><sub id='ltqBd'></sub></form><legend id='ltqBd'></legend><bdo id='ltqBd'><pre id='ltqBd'><center id='ltqBd'></center></pre></bdo></b><th id='ltqBd'></th></span></q></dt></tr></i><div id='ltqBd'><tfoot id='ltqBd'></tfoot><dl id='ltqBd'><fieldset id='ltqBd'></fieldset></dl></div>

                • <tfoot id='ltqBd'></tfoot>
                    <tbody id='ltqBd'></tbody>

                  <small id='ltqBd'></small><noframes id='ltqBd'>

                  <legend id='ltqBd'><style id='ltqBd'><dir id='ltqBd'><q id='ltqBd'></q></dir></style></legend>
                  本文介绍了PHP SoapClient 请求:不是此服务的有效方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  好吧,我想我需要另一双眼睛来看看这个.我正在对远程服务器上的 echo Web 服务进行简单的 php soapclient 调用.我很确定我没有任何错别字并且函数调用是正确的.但是,我收到一个致命错误,声称该函数不是有效方法.以下是 Web 服务类型的 var_dump.

                  Okay, I think I need another pair of eyes to look over this. I'm making a simple php soapclient call to an echo web service on a remote server. I'm pretty sure I don't have any typos and that the function call is correct. However, I'm receiving a fatal error claiming the function isn't a valid method. Below is a var_dump of the web services types.

                  array(4) { [0]=> string(88) "struct EspException { string Code; string Audience; string Source; string Message; }" [1]=> string(71) "struct ArrayOfEspException { string Source; EspException 异常; }" [2]=> string(43) "struct EchoTestRequest { string ValueIn; }" [3]=> string(45) "struct EchoTestResponse { string ValueOut; }" }

                  array(4) { [0]=> string(88) "struct EspException { string Code; string Audience; string Source; string Message; }" [1]=> string(71) "struct ArrayOfEspException { string Source; EspException Exception; }" [2]=> string(43) "struct EchoTestRequest { string ValueIn; }" [3]=> string(45) "struct EchoTestResponse { string ValueOut; }" }

                  致命错误:未捕获的 SoapFault 异常:[Client] 函数(EchoTestRequest")不是/home/grafixst/public_html/cpaapp/echo_test.php:38 中此服务的有效方法:#0/home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClient->__call('EchoTestRequest', Array) #1/home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClientAuth->EchoTestRequest(Array) #2 {main} 在第 38 行的/home/grafixst/public_html/cpaapp/drew/echo_test.php 中抛出

                  Fatal error: Uncaught SoapFault exception: [Client] Function ("EchoTestRequest") is not a valid method for this service in /home/grafixst/public_html/cpaapp/echo_test.php:38 Stack trace: #0 /home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClient->__call('EchoTestRequest', Array) #1 /home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClientAuth->EchoTestRequest(Array) #2 {main} thrown in /home/grafixst/public_html/cpaapp/drew/echo_test.php on line 38

                  这是我用来拨打电话的代码:

                  Here is the code I'm using to make the call:

                  require_once('SoapClientAuth.php');
                  
                  ini_set("soap.wsdl_cache_enabled", "0");
                  
                  #- Loading the WSDL document
                  $server = "https://wsonline.seisint.com/WsAccurint/EchoTest?ver_=1.65";
                  $wsdl = $server . "&wsdl";     
                  
                  $client = new SoapClientAuth($wsdl,
                                  array(
                                        'login' => $username,
                                        'password' => $password
                                       ));   
                  
                  $types = $client->__getTypes();
                  
                  var_dump($types);
                  
                  echo "</br>";
                  
                  $req = $client->EchoTestRequest(array('ValueIn' => 'echo'));
                  
                  print $req->ValueOut;
                  echo "</br>";
                  

                  推荐答案

                  一个对 Web 服务可用功能的简单请求解决了这个问题.

                  A simple request for the web service's available functions solved the problem.

                  $functions = $client->__getFunctions ();
                  var_dump ($functions);
                  

                  EchoTestRequest 不是有效的函数调用.正确的函数调用是 EchoTest,由函数变量 dump 说明.

                  EchoTestRequest was not a valid function call. The proper function call was EchoTest, which is illustrated by the functions variable dump.

                  array(1) { [0]=> string(54) "EchoTestResponse EchoTest(EchoTestRequest $parameters)" } 
                  

                  这篇关于PHP SoapClient 请求:不是此服务的有效方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何在 CentOS 上启用 SOAP 下一篇:PHP SOAP 和 NuSOAP 哪个更好?

                  相关文章

                  最新文章

                • <legend id='KIoXM'><style id='KIoXM'><dir id='KIoXM'><q id='KIoXM'></q></dir></style></legend>

                  <small id='KIoXM'></small><noframes id='KIoXM'>

                      <i id='KIoXM'><tr id='KIoXM'><dt id='KIoXM'><q id='KIoXM'><span id='KIoXM'><b id='KIoXM'><form id='KIoXM'><ins id='KIoXM'></ins><ul id='KIoXM'></ul><sub id='KIoXM'></sub></form><legend id='KIoXM'></legend><bdo id='KIoXM'><pre id='KIoXM'><center id='KIoXM'></center></pre></bdo></b><th id='KIoXM'></th></span></q></dt></tr></i><div id='KIoXM'><tfoot id='KIoXM'></tfoot><dl id='KIoXM'><fieldset id='KIoXM'></fieldset></dl></div>
                    1. <tfoot id='KIoXM'></tfoot>

                        <bdo id='KIoXM'></bdo><ul id='KIoXM'></ul>