使用肥皂客户端时出现 Uncaught SoapFault 异常

发布于 2024-09-16 09:42:01 字数 1478 浏览 3 评论 0原文

PHP 版本:5.3.3

我正在使用 SOAP 扩展从 Web api 提取数据。您可以在下面看到我的连接详细信息。当到达第 3 行时,我收到一个错误:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl' : failed to load external entity "https://www.global1.autotask.net/atservices/1.2/atws.wsdl" in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php(5): SoapClient->SoapClient('https://www.glo...', Array) #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php on line 5

这是我的连接详细信息:

$wsdl = 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl';
$loginarray = array('login' => "[email protected]", 'password' => "******", 'uri'=>"http://autotask.net/ATWS/v1_2/", 'location'=>"https://global1.autotask.net/atservices/1.2/atws.asmx");
$client = new SoapClient($wsdl, $loginarray);

我用 google 搜索并发现这可能是肥皂扩展的错误?

我已取消注释:

extension=php_soap.dll

在 php.ini 文件中。我还确保我的允许 url fopen 设置为打开:

allow_url_fopen = On

有人知道我如何解决这个问题吗?也许我忘了做某事?

谢谢,

比利

PHP Version: 5.3.3

I'm using the SOAP extension to pull data from a web api. Below you can see my connection details. When it gets to line 3 I get an error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl' : failed to load external entity "https://www.global1.autotask.net/atservices/1.2/atws.wsdl" in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php:5 Stack trace: #0 C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php(5): SoapClient->SoapClient('https://www.glo...', Array) #1 {main} thrown in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\ATAPI\index.php on line 5

Here are my connection details:

$wsdl = 'https://www.global1.autotask.net/atservices/1.2/atws.wsdl';
$loginarray = array('login' => "[email protected]", 'password' => "******", 'uri'=>"http://autotask.net/ATWS/v1_2/", 'location'=>"https://global1.autotask.net/atservices/1.2/atws.asmx");
$client = new SoapClient($wsdl, $loginarray);

I've googled and see that it's possibly a bug with the soap extension?

I've uncommented:

extension=php_soap.dll

In the php.ini file. and I've also made sure my allow url fopen is set to on:

allow_url_fopen = On

Anyone got an idea how I get get round this problem? Maybe I've forgotten to do something?

Thanks,

Billy

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

你丑哭了我 2024-09-23 09:42:01

首先,我建议您在 Autotask CommunITy 网站 (community.autotask.com) 上发布问题,因为那里有很多资源非常熟悉 Autotask 特定的内容。

您使用的 URL 对于 Web 服务访问不正确。如果您使用 https://webservicesg1.autotask.net/atservices/1.2/atws.wsdl 有效吗?

特拉维斯

First, I'd recommend you post a question on the Autotask CommunITy website (community.autotask.com) since there are a lot of resources there who are very familiar with Autotask-specific things.

The URL you are using isn't correct for WebServices access. If you use https://webservicesg1.autotask.net/atservices/1.2/atws.wsdl does it work?

Travis

淡莣 2024-09-23 09:42:01

1)它对我来说效果很好。我可以加载它,甚至不需要密码。嗯,这个问题出现在某些 PHP/Soapclient 版本中。我建议您将PHP升级到最新版本。

2) 如果它仍然不适合您,请尝试 NuSoap。这也太棒了。

1) It works fine for me. I can load that and even do not need the password. Well, the problem occurs in some PHP/Soapclient versions. I advise you to upgrade the PHP to the latest version.

2) If it still does not work for you, try NuSoap. It's pretty awesome too.

思念绕指尖 2024-09-23 09:42:01

为什么您认为某个地方有一个扩展名为 .wsdl 的文件?要从 ASMX Web 服务中获取 WSDL,请将“?wsdl”附加到服务末尾,例如 https://global1.autotask.net/atservices/1.2/atws.asmx?wsdl

Why do you believe there is a file with a .wsdl extension sitting around somewhere? To get the WSDL out of an ASMX web service, append "?wsdl" to the end of the service, e.g., https://global1.autotask.net/atservices/1.2/atws.asmx?wsdl.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文