Skip to content

Instantly share code, notes, and snippets.

@Marko-M
Created November 23, 2015 08:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Marko-M/10238b76c268ca9d47e5 to your computer and use it in GitHub Desktop.
Save Marko-M/10238b76c268ca9d47e5 to your computer and use it in GitHub Desktop.
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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment