Has anyone seen this before where Magento's order.list call returns valid SOAP Response Headers but an empty Response?

And the worst part is that subsequent calls with the same from/to range succeed, but upon the initial connection process (it executes 5 or 6 successful queries before failing), it fails consistently.

2013-03-06T19:01:30+00:00 DEBUG (7): message="Error Fetching http headers - full exception logged in exception.log, Soap last request and response logged in st.log"
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastRequest(): <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3
.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:call><sessionId xsi:type="xsd:string">SCRUBBED</sessionId><resourcePath xsi:type="xsd:string">order.list</resourcePath><args SOAP-ENC:arrayType="ns2:Map[1]" xsi:type="SOAP-ENC:Array"><item xsi:type="ns2:Map"><item><key xsi:type="xsd:string">updated_at</key><value xsi:type="ns2:Map"><item><key xsi:type="xsd:string">from</key><value xsi:type="xsd:string">2012-05-15 07:01:04</value></item><item><key xsi:type="xsd:string">to</key><value xsi:type="xsd:string">2012-06-24 19:01:04</value></item></value></item></item></args></ns1:call></SOAP-ENV:Body></SOAP-ENV:Envelope>
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastRequestHeaders(): POST /index.php/api/soap/index/ HTTP/1.1
Host: domain.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
Content-Length: 1023

2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastResponseHeaders(): HTTP/1.1 200 OK
Date: Wed, 06 Mar 2013 19:01:26 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-Length: 2364630
Content-Type: text/xml; charset=UTF-8
2013-03-06T19:01:30+00:00 DEBUG (7): message="SoapClient::__getLastResponse(): "

I've got developer mode on, display errors on, logging on, and no exceptions are being logged on the SOAP Server side. This test Magento instance has 3k customers and around the same number of orders.

I also tried the suggestion noted here (https://stackoverflow.com/questions/12906775/magento-soap-api-php-exception-thrown-for-login-method-call-looks-like-we-go) and that didn't fix it.

One unique thing about this particular Magento instance is that the customer created_at dates and order dates were randomized using a quick MySQL query using RAND() - as opposed to iterating over proper customer/customer models and setting the created_at dates and save()'ing, so I suppose it's possible because there's some kind of inconsistency internally in the customer entity.

I've seen the same issue occur with orders and customers, but the responses posted here are for the order.list query specifically.

When tested against a real Magento instance of roughly the same size, this did not occur.

  • Sounds like a try/catch somewhere without Mage::logException. If it fails constantly it is reproduceble, right? Then you can debug it :) How do you fix the problem? Restarting the apache/nginx? Mar 7, 2013 at 7:21
  • Ya good idea, I hadn't really thought of that :) It doesn't fail locally, only with this one specific Mage instance, so maybe I should clone that instance down and debug it locally. The problem basically resolves itself upon a subsequent API call. It's really weird. Mar 7, 2013 at 15:17
  • Maybe a timeout? Did you found the error? Share it with us! Apr 7, 2013 at 1:36
  • Nope, haven't found the root cause. This hasn't reproduced yet on any other Magento instance - have tested probably 10 to 15 by now - so I'm pretty sure it was a problem with the database data in the instance we were testing. Not sure if I should give an answer for this one though. Apr 8, 2013 at 17:20
  • BAM! stackoverflow.com/questions/12792563/…
    – B00MER
    Jul 30, 2013 at 1:59

1 Answer 1


I believe that this issue was caused by the test data that was generated on the Magento instance where it occurred. Pretty sure that's the case as it only ever occurred in one Magento instance, which was the one where a bunch of test customers and orders were generated.

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.