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

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

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

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

        将 PHP SoapClient 与本地 WSDL 文件(非 URI)一起使用的

        时间:2023-05-22

            <tfoot id='ZIrJg'></tfoot>
              <tbody id='ZIrJg'></tbody>

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

                  <bdo id='ZIrJg'></bdo><ul id='ZIrJg'></ul>
                • <legend id='ZIrJg'><style id='ZIrJg'><dir id='ZIrJg'><q id='ZIrJg'></q></dir></style></legend>
                • 本文介绍了将 PHP SoapClient 与本地 WSDL 文件(非 URI)一起使用的任何解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个在服务器上以 CLI 模式运行的应用程序,它既没有也不需要运行本地 httpd.该应用程序使用 SOAP 与 Web 服务提供者进行传出交互.有问题的提供程序存在一些可用性问题,我们正在尝试通过按照他们的建议在本地托管 WSDL 文件来减少问题的数量.

                  I have an application running in CLI mode on a server that neither has nor needs to run a local httpd. The application does outgoing interactions with a web services provider using SOAP. The provider in question has some availability issues and we are trying to reduce the number of issues by hosting the WSDL file locally at their suggestion.

                  似乎 SoapClient 构造函数(在 WSDL 模式下)只能使用 URI WSDL 文件,但我试图找出某种方法来解决此限制,并让它从本地文件系统中读取 WSDL 文件某种方式.我很惊讶 SoapClient 构造函数没有传递文件名或文本字符串的选项,我可以在之前简单地阅读.

                  It seems that the SoapClient constructor (in WSDL mode) can only make use of a URI WSDL file, but I am trying to figure out some way to work around this limitation and have it read the WSDL file from the local filesystem in some way. I am surprised that the SoapClient constructor does't have an option to pass a filename or a string of text which I could have simple read in prior.

                  有没有人就如何避开这个限制并做我正在尝试的事情提出建议?

                  Has anyone got a suggestion on how to sidestep this limitation and do what I am attempting?

                  推荐答案

                  SoapClient() 采用一个 URI,它不仅支持网址,还支持本地文件路径.但是相对路径在这里不起作用,所以它需要是完整的文件路径.

                  SoapClient() takes a URI which supports not only web addresses, but local file paths. But relative paths aren't working here, so it needs to be the full file path.

                  这里介绍了如何使用相对引用加载本地 WSDL 文件.如果 WSDL 与当前 PHP 文件在同一目录中:

                  Here's how to load a local WSDL file with a relative reference. If the WSDL is in the same directory as the current PHP file:

                  new SoapClient(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'the.wsdl.xml');
                  

                  或者如果它在当前 PHP 文件的子文件夹中:

                  or if it's in a subfolder of the current PHP file:

                  new SoapClient(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'subfolder' . DIRECTORY_SEPARATOR . 'the.wsdl.xml');
                  

                  或者如果它在当前 PHP 文件的父文件夹中:

                  or if it's in a parent folder of the current PHP file:

                  new SoapClient(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'the.wsdl.xml');
                  

                  这篇关于将 PHP SoapClient 与本地 WSDL 文件(非 URI)一起使用的任何解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:无法理解 PHP 中的 SOAP 下一篇:PHP Soap 非 WSDL 调用:如何传递参数?

                  相关文章

                  最新文章

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

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

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