Problem with consuming webservices using https in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
suresh kumar gokarakonda
Forum Newbie
Posts: 1
Joined: Thu Nov 02, 2006 9:38 pm

Problem with consuming webservices using https in PHP

Post by suresh kumar gokarakonda »

hi all,
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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ssl://domain/path/file.ext?query#hash
Post Reply