Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento SOAP 2 API Fatal error: Procedure 'login' not present

I am getting: Fatal error: Procedure 'login' not present in /chroot/home/mystore/mystore.com/html/lib/Zend/Soap/Server.php on line 832

This is where the error is coming from

$soap = $this->_getSoap();

    ob_start();
    if($setRequestException instanceof Exception) {
        // Send SOAP fault message if we've catched exception
        $soap->fault("Sender", $setRequestException->getMessage());
    } else {
        try {
            $soap->handle($request);
        } catch (Exception $e) {
            $fault = $this->fault($e);
            $soap->fault($fault->faultcode, $fault->faultstring);

Any Ideas on how to fix the error?

like image 788
Manoi Avatar asked Sep 14 '12 13:09

Manoi


2 Answers


I had the same issue, and which I did to fix it was to go to System/Configuration/Magento Core API and set the value WS-I Compliance as 'No'.
I'm working with a WebService which consumes the Magento V2 API, I don't recall if I generate the web reference using this value as 'Yes'; I'm working with a WS C# using VS 2010.

like image 76
Eliezer Moreno Avatar answered Oct 13 '22 21:10

Eliezer Moreno


I had similar problem and I did not want to change the API version. Deleting the WSDL cache helped me.

Run this to get the WSDL cache folder:

php -i | grep soap

From the result you can see that the WDSL cache is enabled and stored in /tmp:

soap
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

Remove the cache and run it again:

sudo rm -rf /tmp/*

I found the clue in this article - http://artur.ejsmont.org/blog/content/php-soap-error-procedure-xxx-not-present

like image 36
Tomas Dermisek Avatar answered Oct 13 '22 21:10

Tomas Dermisek