php 未捕获的 SoapFault 异常:[WSDL] SOAP-ERROR:解析 WSDL 无法从“http://88.XXX.XXX.XXX:8080/”加载

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17284735/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 12:37:41  来源:igfitidea点击:

Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL Couldn't load from 'http://88.XXX.XXX.XXX:8080/

phpsoapwsdl

提问by Gilles

I'm having trouble calling a web service from php. With my personnal website, nothing wrong. But when i try from my dedicated server :

我在从 php 调用 Web 服务时遇到问题。用我的个人网站,没有错。但是当我从我的专用服务器尝试时:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl' : failed to load external entity "http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl"

致命错误:未捕获的 SoapFault 异常:[WSDL] SOAP-ERROR:解析 WSDL:无法从“ http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl”加载:无法加载外部实体“ http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl"

The same .php on my website and dedicated server :

在我的网站和专用服务器上使用相同的 .php:

 function __construct( $_ip, $_num_serie) {
 $this->ip = $_ip;
$this->num_serie = $_num_serie;
$this->soap = new SoapClient("http://".$this->ip.":8080/SongBoxServeur/GestionSongBox?wsdl",array(
                                    'trace' => true,
                                    'exceptions' => true));
                                    }

What could the problem be? (soap is enabled on both) Thx in advance

可能是什么问题?(两者都启用了肥皂)提前 Thx

回答by Gilles

I find my problem : php.ini.

我发现我的问题:php.ini。

 default_socket_timeout = 0

change by:

改变:

default_socket_timeout =300

And now, it's works !!!

现在,它起作用了!!!

回答by Rickard Andersson

Make sure that $this->ipis accessible from the server. In other words, from the dedicated server, make sure you can open up http://88.xxx.xxx.xxx:8080/SongBoxServeur/GestionSongBox?wsdlin a browser. If you can't, there's some networking configuration you need to attend to first.

确保$this->ip可以从服务器访问。换句话说,从专用服务器,确保您可以在浏览器中打开http://88.xxx.xxx.xxx:8080/SongBoxServeur/GestionSongBox?wsdl。如果不能,则需要首先注意一些网络配置。