[英]Web service using SOAP, WSDL not working - PHP
I am trying to gain access to a 'free' web service which publishes London Gold and Silver Fixes. 我试图访问发布伦敦金和银修复程序的“免费”网络服务。
I have found the following two services, but I am unable to get the services to return any useful data. 我发现了以下两个服务,但是我无法获得这些服务以返回任何有用的数据。
Am I doing something wrong or is the server not publishing any data? 我做错了事还是服务器未发布任何数据? Does anybody know of any other 'free' London Gold & Silver Fix servers which work?
有人知道其他任何可用的“免费”伦敦金银修复服务器吗?
CLIENT CODE: 客户代码:
<pre>
<?php
$c = new soapclient('http://www.restfulwebservices.net/wcf/LondonGoldFixService.svc?wsdl');
print_r($c->GetMarketData());
?>
</pre>
<br />
<pre>
<?php
$c = new soapclient('http://www.webservicex.net/londongoldfix.asmx?wsdl');
print_r($c->GetLondonGoldAndSilverFix());
?>
</pre>
SERVER OUTPUT: 服务器输出:
stdClass Object
(
[GetMarketDataResult] => stdClass Object
(
[Gold_AM_USD] => 0
[Gold_AM_STG] => 0
[Gold_AM_EUR] => 0
[Gold_PM_USD] => 0
[Gold_PM_STG] => 0
[Gold_PM_EUR] => 0
[Silver_CENTS] => 0
[Silver_PENCE] => 0
[Silver_EUR] => 0
[Status] => Failed
)
)
stdClass Object
(
[GetLondonGoldAndSilverFixResult] => stdClass Object
(
[Gold_AM_USD] => 0
[Gold_AM_STG] => 0
[Gold_AM_EUR] => 0
[Gold_PM_USD] => 0
[Gold_PM_STG] => 0
[Gold_PM_EUR] => 0
[Silver_CENTS] => 0
[Silver_PENCE] => 0
[Silver_EUR] => 0
[Status] => Failed
)
)
It looks like the server is returning data. 看起来服务器正在返回数据。 It's all zero.
全为零。 Your soap code is working.
您的肥皂代码正在工作。 The website must be returning bad data or be broken.
该网站必须返回错误数据或被破坏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.