SOAP、WSDL、PHP 没有什么问题
我可以访问 Web 服务 https://www.hometownquotes.com/objects/auto.cfc ?WSDL 我还可以访问 https://www.hometownquotes.com/objects/test.cfc? WSDL
我尝试使用此服务:
$client = new SoapClient("https://www.hometownquotes.com/objects/test.cfc?WSDL");
$myArgument = '';
$result1 = $client->myFunction($myArgument);
var_dump($result1);
我收到 string(3) "foo" - 我认为:这对于测试来说是正常的。
但是,当我使用真实服务时:
$client = new SoapClient("https://www.hometownquotes.com/objects/auto.cfc?WSDL");
$strYear = '1981';
$intAffiliateID = '1111';
$strAffiliatePass = 'password';
$result1 = $client->getMakesWS($strYear, $intAffiliateID, $strAffiliatePass);
var_dump($result1);
仅回答: string(0) ""
问题出在哪里? 谢谢。
I have access to web service https://www.hometownquotes.com/objects/auto.cfc?WSDL
Also I have access to https://www.hometownquotes.com/objects/test.cfc?WSDL
I try use this service:
$client = new SoapClient("https://www.hometownquotes.com/objects/test.cfc?WSDL");
$myArgument = '';
$result1 = $client->myFunction($myArgument);
var_dump($result1);
I recive string(3) "foo" - I think: It's normal for test.
But, when I use real service:
$client = new SoapClient("https://www.hometownquotes.com/objects/auto.cfc?WSDL");
$strYear = '1981';
$intAffiliateID = '1111';
$strAffiliatePass = 'password';
$result1 = $client->getMakesWS($strYear, $intAffiliateID, $strAffiliatePass);
var_dump($result1);
in answer only: string(0) ""
Where problem?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定您拥有正确的会员 ID 和密码吗?似乎无论我尝试什么随机联属 ID 和密码,结果总是您得到的(空字符串)。这向我表明您没有使用正确的凭据。
Are you sure you have the correct affiliate id and password? It seems no matter what random affiliate id and password I try, the result is always what you are getting (the nullstring). This is an indication to me that you are not using the correct credentials.