If I try with below code,

defined('BASEPATH') OR exit('No direct script access allowed');

class Live_stock extends CI_Controller {

    public function index()

        $proxy = new SoapClient('www.abc.com/api/v2_soap/?wsdl'); // TODO : change url
        $sessionId = $proxy->login('abc', 'abc123'); // TODO : change login and pwd if necessary
        $result = $proxy->catalogProductList($sessionId);


My output :

enter image description here

How to solve my error?

1 Answer 1


Solved. (CodeIgniter)

$proxy = new SoapClient('abc.com/api/v2_soap/?wsdl=1'); 
$sessionId = $proxy->login((object)array('username' => 'abc', 'apiKey' => 'abc123'));
$result = $proxy->catalogProductList((object)array('sessionId' => $sessionId->result, 
'filters' => null));        
return $result->result();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.