How to:CodeIgniter to create and call SoapClient in php
codeigniter, php, soap-client
Solution
Using SoapClient is no different in CodeIgniter than it is using plain old PHP.
e.g. using SoapClient to load orders from Magento:
$client = new SoapClient($magento_server . "/index.php/api/v2_soap?wsdl=1");
$session = $client->login($magento_api_user, $magento_api_key);
$filters = array(
'created_at' => array( '>' => $from_date),
'created_at' => array( '<' => $to_date)
);
$orders = $client->salesOrderList($session, $filters);
PHP Reference: http://php.net/manual/en/class.soapclient.php
Problem
I'm new to CodeIgniter and PHP. Can someone tell me how to create a Soap client to call Soap server methods using CodeIgniter? Just any sample or an example. Please help me, I want to learn how soap works in Codeigniter for my new web-app?