17 October 2016

Upgrade to Magento 1.9.3: SOAP API problems

When you are upgrading your Magento webshop to 1.9.3. 2 these SOAP API problems will arise with the connection between Dynamics NAV and Magento:

  1. SalesOrderInfo XML response will not return the ordered items, there is an empty section for the <items>
  2. All outbound traffic (like productUpdate, stockUpdate) will result in an internal error

How to solve these issues:

  1. Apply this fix in Magento: https://community.magento.com/t5/Version-Upgrades/After-upgrade-from-1-9-2-2-to-1-9-3-soap-v1-api-not-returning/m-p/50594#M1907
  2. Apply the fix in this file: app/code/core/Mage/Api/Model/Server/Handler/Abstract.php

// @bugfix: Removed argument cast of array, because $result could be non-array
public function processingMethodResult($result)
{
// @bugfix: Fix wrong input of this method
if (!is_array($result)) {
return $result;
}

foreach ($result as &$row) {
// @bugfix: https://community.magento.com/t5/Version-Upgrades/After-upgrade-from-1-9-2-2-to-1-9-3-soap-v1-api-not-returning/m-p/50594#M1907
if (!is_null($row) && !is_bool($row) && !is_numeric($row) && !is_array($row)) {
$row = $this->processingRow($row);
}
}
return $result;
}