Problem with consuming webservices using https in PHP
Posted: Thu Nov 02, 2006 9:53 pm
hi all,
i have the below mentioned versions of software
1) php 5.1.6
i have the below mentioned versions of software
1) php 5.1.6
Code: Select all
ctype curl date dom hash iconv libxml oci8 pcre PDO posix Reflection session SimpleXML soap SPL SQLite standard tokenizer xml xmlreader xmlrpc xmlwriter
2) OpenSSL version 0.9.8c
3) apache 2.0.59
i have compiled php with ssl enabled.
the following code
[syntax=php]$client = new SoapClient('https://<hostname>:443/bss_webservice/webService.asmx?wsdl',
array('trace' => 1));
$params = array('ConsumeOrders' => 'Peter');
$city = $client->ConsumeOrders($params,$options);[/syntax]
Gives error
[syntax=php]PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://<hostname>:443/bss_webservice/webService.asmx?wsdl' in /opt/app/web/bssdev/htdocs/farm/webservice/cpeprocurement/testfolder/sampleClient_backup.php on line 15
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://<hostname>:443/bss_webservice/webService.asmx?wsdl' in /opt/app/web/bssdev/htdocs/farm/webservice/cpeprocurement/testfolder/sampleClient_backup.php:15
Stack trace:
#0 /opt/app/web/bssdev/htdocs/farm/webservice/cpeprocurement/testfolder/sampleClient_backup.php(15): SoapClient->__construct('https://edb2bte...', Array)[/syntax]
the same code if i use
[syntax=php]$client = new SoapClient('http://<hostname>/bss_webservice/webService.asmx?wsdl',
array('trace' => 1));[/syntax]
i.e. with out "https" works well.
Does any body knows what the reason and a solution to this problem
Regards
suresh.