Version 1 (modified by TS, 12 years ago)

--

Przewodnik wdrożeniowca > Usuwanie produktu

Definicja parametrów:

<?php

/**
 *  Usuwa produkt produkt
 *   
 *  @param data Array - Tablica z parametrami
 *  @param data['symbol'] Text - symbol produktu musi być unikalny w obrębie jednostki
 *   
 *  @return Int - id produktu jeśli sukces (depository:depoid), 0 w razie niepowodzenia
 *   
 *  @throws Exception - SoapFault
 */
Int deleteProduct(Array data)

?>

Przykłady wywołań:


// Plik MyService.php umieszczony w apps/edokumenty.
// MyService.php
<?php

define('EDOK_API_LOGIN', 'developer');
define('EDOK_API_PASSWORD', 'developer');
define('DEFAULT_ENTITY_SYMBOL', 'demo');

require_once('./classes/eDokumentyApi/EDokApiClient.inc');

$options = array(
    'location' => 'http://{host}:{port}/eDokumentyApi.php',
    "uri" => "eDokumentyAPI",
    'encoding'=>'UTF-8'
);
        
$client = new EDokApiClient(NULL, $options);
$client->setUser(EDOK_API_LOGIN);
$client->setPass(md5(EDOK_API_PASSWORD));
$header = new SoapHeader('eDokumentyAPI', 'entity_symbol', DEFAULT_ENTITY_SYMBOL);
$client->__setSoapHeaders($header);



?>