PHP SoapClient unable to work with https WS

一世执手 提交于 2019-12-01 07:36:45
Eron Villarreal

You will need to have OpenSSL enabled in PHP to be able to retrieve content over https.

Uncomment this line in php.ini

extension=php_openssl.dll

Look for the openssl section in your phpinfo():

OpenSSL support => enabled  
OpenSSL Library Version => OpenSSL 0.9.8k 25 Mar 2009
OpenSSL Header Version => OpenSSL 0.9.8k 25 Mar 2009

I just ran the code you gave and it worked perfectly:

<?php
$url = "https://id3check.gb.co.uk/gbportalinternational/aspx/id3check_1b.asmx?WSDL";
$options["connection_timeout"] = 25;
$options["location"] = $url;
$options['trace'] = 1;

$client = new SoapClient($url,$options);

print_r($client->__getFunctions());

results in

Array
(
    [0] => ID3CheckInitialise_1bResponse ID3CheckInitialise_1b(ID3CheckInitialise_1b $parameters)
    [1] => ID3AddressLookupInitialise_1bResponse ID3AddressLookupInitialise_1b(ID3AddressLookupInitialise_1b $parameters)
    [2] => ID3Check_1bResponse ID3Check_1b(ID3Check_1b $parameters)
    [3] => AddressLookup_1bResponse AddressLookup_1b(AddressLookup_1b $parameters)
)

So maybe you should check if there are any network problems: Is there a firewall blocking the communication from within your server process? (I assume it's IIS?) You may also want to check safe_mode settings, although I doubt this is the problem here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!