i am trying to call a method from a wsdl and getting an error. i am new to soap and learning all i can. i know rest is better but i really want to learn soap. this is what i have so far:
ini_set('soap.wsdl_cache_enable', '0');
$client = new SoapClient('http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl');
$data = $client->__soapCall('GetQuote', array('GetQuote' => 'aapl'));
print $data;
the error i get is
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> Object reference not set to an instance of an object. in /Volumes/www/public/soap/s.php:5 Stack trace: #0 /Volumes/www/public/soap/s.php(5): SoapClient->__soapCall('GetQuote', Array) #1 {main} thrown in /Volumes/www/public/soap/s.php on line 5
thanks
You can see all required parameters for the
GetQuoterequest inhttp://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdlYou should pass a
StockSymbolandLicenseKey. Example of request:Replace TEST_STR with your data