【问题标题】:SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://ads.google...LineItemService?wsdl' : failed to load external entitySOAP 错误:解析 WSDL:无法从 'https://ads.google...LineItemService?wsdl' 加载:无法加载外部实体
【发布时间】:2017-01-24 22:37:09
【问题描述】:

我正在我的服务器上尝试使用 Google DFP(Doubleclick for Publishers)Api。我已经安装了脚本及其所有依赖项,并且我已经设置了它们。但是当我在控制台中运行 PHP 文件时,我每次都会收到这个错误。

PHP 致命错误:SOAP-ERROR:解析 WSDL:无法从“https://ads.google.com/apis/ads/publisher/v201611/LineItemService?wsdl”加载:无法加载外部实体“https://ads.google.com/apis/ads/publisher/v201611/LineItemService?wsdl " 在 /home/admin/web/glob.space/public_html/src/Google/AdsApi/Common/AdsSoapC lient.php 第 65 行

你能告诉我,为什么会这样吗?这不是代码问题,因为我使用的是原始示例代码。

提前致谢!

【问题讨论】:

  • 你可以使用 wget 从终端访问 wsdl 吗?
  • 嗨,克里斯,是的,我可以。
  • OrderService 也有同样的问题。我还可以在浏览器中打开 URL,通过 wget 获取它,甚至使用 file_get_contents 获取它,并在同一个 php 脚本中 curl。找到原因了吗?

标签: php linux soap wsdl google-dfp


【解决方案1】:

只需在 Service 和 ? 之间添加一个斜线字符在https://ads.google.com/apis/ads/publisher/v201611/LineItemService?wsdl

参考。 http://asanamuz.ir/wp/?p=131

【讨论】:

  • 这是错误的。如果在这种情况下添加斜线,则请求使用不存在的空名称进行操作。
猜你喜欢
  • 1970-01-01
  • 2019-04-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-20
  • 1970-01-01
相关资源
最近更新 更多