3

If I try with below code,

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

class Live_stock extends CI_Controller {

    public function index()
    {
        //$this->load->view("live_stock_view");

        $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);
        var_dump($result);

    }
}

My output :

enter image description here

How to solve my error?

0

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, privacy policy and cookie policy

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