[英]MantisConnect.php Error - Couldn't load from 'http://www.mantisbt.org/demo/api/soap/mantisconnect.php' : failed to load external entity
I am trying to get the status of issues from Mantis. 我正在尝试从螳螂那里获取问题的状态。 Having search through other posts here, people indicate that the web service on their site should be working.
搜索了这里的其他帖子后,人们指出他们站点上的Web服务应该正常工作。 However I get the error when attempting this.
但是,尝试此操作时出现错误。 Openssl, SOAP, curl, etc... are all enabled in my PHP (5.4.26).
Openssl,SOAP,curl等...都在我的PHP(5.4.26)中启用。
Sample code: (External Mantis works) 示例代码:(外部螳螂作品)
<?php
$SoapWSDLAddress = 'http://www.mantisbt.org/demo/api/soap/mantisconnect.php?wsdl';
$Client = new SoapClient($SoapWSDLAddress, array('trace' => true, 'encoding' => 'UTF-8', 'soap_version' =>SOAP_1_2));
...
?>
Internal Site, which has MantisConnect installed that gets Exception. 内部站点,已安装MantisConnect,并获得Exception。
<?php
$SoapWSDLAddress = 'http://192.168.0.1/mantis/api/soap/mantisconnect.php?wsdl';
$Client = new SoapClient($SoapWSDLAddress, array('trace' => true, 'encoding' => 'UTF-8', 'soap_version' =>SOAP_1_2));
...
?>
I get an exception on the SoapClient call: 我在SoapClient调用上遇到异常:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ' http://192.168.0.1/mantis/api/soap/mantisconnect.php?wsdl' : failed to load external entity "http://192.168.0.1/mantis/api/soap/mantisconnect.php?wsdl"
Going to the web address in my browser does show me the output for Mantis connect. 在浏览器中转到网址确实向我显示了螳螂连接的输出。
Original code posting had a space before the http:// which caused the problem. 原始代码发布在导致问题的http://之前有一个空格。 Changing the code to remove the space fixed the error.
更改代码以删除空格可修复错误。
$SoapWSDLAddress = 'http://www.mantisbt.org/demo/api/soap/mantisconnect.php?wsdl';
$Client = new SoapClient($SoapWSDLAddress, array('trace' => true, 'encoding' => 'UTF-8', 'soap_version' =>SOAP_1_2));
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.