Created
November 23, 2015 08:07
-
-
Save Marko-M/10238b76c268ca9d47e5 to your computer and use it in GitHub Desktop.
Debug SOAP requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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