<legend id='bukpl'><style id='bukpl'><dir id='bukpl'><q id='bukpl'></q></dir></style></legend>

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

        • <bdo id='bukpl'></bdo><ul id='bukpl'></ul>
      1. <tfoot id='bukpl'></tfoot>

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

        PHP Soap 非 WSDL 调用:如何传递参数?

        时间:2023-05-22

            <tfoot id='DhGNc'></tfoot>
          1. <legend id='DhGNc'><style id='DhGNc'><dir id='DhGNc'><q id='DhGNc'></q></dir></style></legend>

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

              • <small id='DhGNc'></small><noframes id='DhGNc'>

                  本文介绍了PHP Soap 非 WSDL 调用:如何传递参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试像这样在 PHP (5.2.5) 中进行非 WSDL 调用.我确定我错过了一些简单的东西.这个调用有一个参数,一个字符串,叫做时区":

                  I'm trying to make a non-WSDL call in PHP (5.2.5) like this. I'm sure I'm missing something simple. This call has one parameter, a string, called "timezone":

                      $URL = 'http://www.nanonull.com/TimeService/TimeService.asmx';
                  
                      $client = new SoapClient(null, array(
                          'location' => $URL,
                          'uri'      => "http://www.Nanonull.com/TimeService/",
                          'trace'    => 1,
                          ));
                  
                  // First attempt:
                  // FAILS: SoapFault: Object reference not set to an instance of an object
                     $return = $client->__soapCall("getTimeZoneTime",
                         array(new SoapParam('ZULU', 'timezone')),
                         array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
                      );
                  
                  // Second attempt:
                  // FAILS: Generated soap Request uses "param0" instead of "timezone"
                     $return = $client->__soapCall("getTimeZoneTime",
                         array('timezone'=>'ZULU' ),
                         array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
                     );
                  

                  感谢您的建议
                  -戴夫

                  Thanks for any suggestions
                  -Dave

                  推荐答案

                  谢谢.这是现在有效的完整示例:

                  Thanks. Here's the complete example which now works:

                  $URL = 'http://www.nanonull.com/TimeService/TimeService.asmx';
                  
                  $client = new SoapClient(null, array(
                      'location' => $URL,
                      'uri'      => "http://www.Nanonull.com/TimeService/",
                      'trace'    => 1,
                      ));
                  
                  $return = $client->__soapCall("getTimeZoneTime",
                     array(new SoapParam('ZULU', 'ns1:timezone')),
                     array('soapaction' => 'http://www.Nanonull.com/TimeService/getTimeZoneTime')
                  );
                  

                  这篇关于PHP Soap 非 WSDL 调用:如何传递参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将 PHP SoapClient 与本地 WSDL 文件(非 URI)一起使用的 下一篇:肥皂:信封 SOAP-ENV:信封 PHP

                  相关文章

                  最新文章

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

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

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

                  1. <legend id='hofeg'><style id='hofeg'><dir id='hofeg'><q id='hofeg'></q></dir></style></legend>