Jump to content

Consuming web services in PHP


php34

Recommended Posts

hi all,
i have the below mentioned versions of software

1) php 5.1.6 [PHP Modules]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
[code=php:0]
$client = new SoapClient('https://<hostname>:443/bss_webservice/webService.asmx?wsdl',
array('trace' => 1));

$params = array('ConsumeOrders' => 'Peter');
$city = $client->ConsumeOrders($params,$options);[/code]
Gives error

[code=php:0]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)[/code]


the same code if i use

[code=php:0]$client = new SoapClient('http://<hostname>/bss_webservice/webService.asmx?wsdl',
array('trace' => 1));[/code]
i.e. with out "https" works well.

Does any body knows what the reason and a solution to this problem


Regards
php34
Link to comment
https://forums.phpfreaks.com/topic/26016-consuming-web-services-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.