Magento – Magento SOAP API Slow Response need Solution

apimagento-1.9soap

I use my localhost response time is 30sec++ (about 2min.i need 30sec)

$client = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl');

// If some stuff requires api authentification,
// then get a session token
$session = $client->login('cats', 'cats@123');
$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'type',
            'value' => array('key' => 'in', 'value' => 'simple,configurable')
        )
    )
);
$result = $client->catalogProductList($session, $complexFilter);

    // Product List here...
    echo '<ul>';

    for($i=0; $i<count($result); $i++){
    echo  '<li style="list-style:decimal;">'.$result[$i]->sku.'<br/>'.$result[$i]->name.'</li>';
    }
    echo '</ul>';
    //var_dump ($result);

Best Answer

This might not be practical for everyone, but I switched from SOAP to XML-RPC and my calls went from 30-60 seconds to < 3 seconds. I tried all the suggestions on caching and nothing else worked.

Related Topic