0

我正在使用 SoftLayer PHP 库从 shell 脚本调用 SoftLayer API。

调用时出现以下错误

SoftLayer_SoapClient::getClient ( "SoftLayer_Product_Package", $pakagekey, $userName, $apiKey );

查询 SoftLayer API 时出错:无法连接到主机 ERROR | | SOAP-ERROR: Parsing Schema: can't import schema from ' https://api.softlayer.com/soap/v3/SoftLayer_Product_Package?xsd ' 错误 | PHP | ERR 1 带有消息 SOAP-ERROR: Parsing Schema: can't import schema from ' https://api.softlayer.com/soap/v3/SoftLayer_Product_Package?xsd ' in /softlayer/SoftLayer/SoapClient.class.php:262

SoapClient.class.php 262 有

$soapClient = new SoftLayer_SoapClient($endpointUrl . $serviceName . '?wsdl');

知道为什么我会收到此错误吗?

4

1 回答 1

0

该代码对我来说工作正常。请检查您是否可以在浏览器中成功打开这些链接:

https://api.softlayer.com/soap/v3/SoftLayer_Product_Package?wsdl https://api.softlayer.com/soap/v3/SoftLayer_Product_Package?xsd

该错误看起来您的机器无法连接到这些链接。

还要确保您使用的是最新版本的 PHP API 客户端

问候

于 2016-02-02T14:38:58.857 回答