Debug SOAP requests
<?php
/**
* Debug SOAP requests
*/
$client = new SoapClient(
'http://example.loc/index.php/api/v2_soap/?wsdl'
);
// Set yourself debug session cookie, for Xdebug and Phpstorm
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
$session = $client->login('user', 'key');
$productId = '123456';
$stockItemData = array(
'qty' => '123',
'is_in_stock ' => 1,
'manage_stock ' => 1
);
$result = $client->catalogInventoryStockItemUpdate($session, $productId, $stockItemData);