I am trying to fetch response from sending PHP SoapClient request. My understanding is that in Soap, the class exists on the Soap-server and is specified and fetched as an argument to Soapclient, pointing out the wsdl file.
I am using following link references:
Webservices:
- https://swea.riksbank.se/sweaWS/docs/api/index.htm
- https://swea.riksbank.se/sweaWS/docs/api/call/getAnnualAverageExchangeRates.htm
PHP Soapclient:
How to make a PHP SOAP call using the SoapClient class
My code:
<? php
$client = new SoapClient("https://swea.riksbank.se/sweaWS/wsdl/sweaWS_ssl.wsdl");
$params = array (
"year" => 2010,
"month" => 4
);
$response = $client->__soapCall('getAnnualAverageExchangeRates()', array($params));
var_dump($response);
The error message:
PHP Fatal error: Uncaught Error: Class 'SoapClient' not found in /[path/Xxx.php:4
Stack trace:
#0 {main}
thrown in /path/Xxx.php on line 4
var_dump($response)