<legend id='2bpu6'><style id='2bpu6'><dir id='2bpu6'><q id='2bpu6'></q></dir></style></legend>

    • <bdo id='2bpu6'></bdo><ul id='2bpu6'></ul>
    <tfoot id='2bpu6'></tfoot>
  1. <small id='2bpu6'></small><noframes id='2bpu6'>

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

      SoapClient:如何传递多个同名元素?

      时间:2023-05-22

    1. <small id='fTSOx'></small><noframes id='fTSOx'>

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

              <bdo id='fTSOx'></bdo><ul id='fTSOx'></ul>
              1. <legend id='fTSOx'><style id='fTSOx'><dir id='fTSOx'><q id='fTSOx'></q></dir></style></legend>

                本文介绍了SoapClient:如何传递多个同名元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我有以下代码:

                $telnums = array(10, 20, 30);
                $obj = new StdClass();
                $obj->telnums = new StdClass();
                foreach ($telnums as $telnum) {
                    $obj->telnums = $telnum;
                }
                
                call_user_func(array($this->client, 'createDomain'), new SoapVar($obj, SOAP_ENC_OBJECT));
                

                $this->client 是 SoapClient 类的一个实例.

                There $this->client is an instance of SoapClient class.

                它生成以下请求:

                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="...">
                    <SOAP-ENV:Body>
                        <ns1:createDomain>
                            <createDomainRequest>
                                <telnums>30</telnums>
                            </createDomainRequest>
                        </ns1:createDomain>
                    </SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
                

                但我需要

                            <createDomainRequest>
                                <telnums>10</telnums>
                                <telnums>20</telnums>
                                <telnums>30</telnums>
                            </createDomainRequest>
                

                我如何才能做到这一点?

                How I can achieve this?

                P.S.: PHP 5.2.6-3ubuntu4.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 6 2010 22:25:33)

                P.S.: PHP 5.2.6-3ubuntu4.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Jan 6 2010 22:25:33)

                提前致谢!

                推荐答案

                通过 extends SoapClient 修复它并覆盖 __doRequest() 方法,我在这里修改请求:http://www.php.net/manual/en/soapclient.dorequest.php#57995

                Fixed it by extends SoapClient and overrides __doRequest() method where I modify request as descibed here: http://www.php.net/manual/en/soapclient.dorequest.php#57995

                对我来说看起来很糟糕,但它就在这里,现在"有效.

                Looks terrible for me, but it works "right here, right now".

                这篇关于SoapClient:如何传递多个同名元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:PHP SOAP 传输文件 下一篇:在 PHP SimpleXML 对象上使用 xpath,SOAP + 命名空间

                相关文章

                最新文章

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

                  1. <small id='kVITE'></small><noframes id='kVITE'>