I am having serious trouble trying to get this url to load in my code. When I go to the actual page in the browser it loads fine, but when I parse it its basically giving a 404, I have tried this using soap client and curl thinking ok maybe im doing something wrong.
This is my code, you can see its the bare basics.
$customerId = 'xxxx';
$authenticationId = 'xxxx';
$url = 'https://test.api.800loanmart.com/LoanmartService.svc?wsdl';
$config = array('trace' => 1, 'exceptions' => 0);
$service = new SoapClient($url,$config);
$result = $service->GetTermsAndConditions($customerId, $authenticationId);
var_dump($service);
and this is what it is throwing back at me...
Warning: SoapClient::SoapClient() [soapclient.soapclient]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\loanmart\index.php on line 6
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "https://test.api.800loanmart.com/LoanmartService.svc?wsdl" in C:\xampp\htdocs\loanmart\index.php on line 6
Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://test.api.800loanmart.com/LoanmartService.svc?wsdl' : failed to load external entity "https://test.api.800loanmart.com/LoanmartService.svc?wsdl" in C:\xampp\htdocs\loanmart\index.php on line 6
I have checked to see if I have openssl and it is turned on in my php.ini file, im just pretty stumped as to what to do.
Even if you did check, this is nothing but an openssl configuration issue (used in SoapClient, but still)
Try to file_get_contents($wsdl_url);
Also, check your currently loaded php.ini & supported streams (php.ini might differs from CLI to web SAPI)
php -r "phpinfo();" > file.txt
Mine : Registered PHP Streams => php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, https, ftps, phar
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls (your code sample works on my computer :p)
Simple issue that gave me headaches! Open your php.ini file in your apache server directory and uncomment(enable) the line extension=php_openssl.dll
.
This fix my issue.
make active extension=php_openssl.dll in php.ini. Restart server.