Zmiany pomiędzy wersją początkową i wersją 1 dla DeployerGuide/Others/eDokumentyApi/DeleteProduct

Pokaż
Ignoruj:
Data i czas:
02/06/12 13:00:57 (12 years temu)
Autor:
TS (IP: 213.227.67.33)
Komentarz:

--

Legend:

Bez zmian
Dodane
Usunięte
Zmienione
  • DeployerGuide/Others/eDokumentyApi/DeleteProduct

    v1 v1  
     1= [wiki:DeployerGuide Przewodnik wdrożeniowca] > Usuwanie produktu = 
     2 
     3 
     4''' Definicja parametrów: ''' 
     5{{{ 
     6#!php 
     7<?php 
     8 
     9/** 
     10 *  Usuwa produkt produkt 
     11 *    
     12 *  @param data Array - Tablica z parametrami 
     13 *  @param data['symbol'] Text - symbol produktu musi być unikalny w obrębie jednostki 
     14 *    
     15 *  @return Int - id produktu jeśli sukces (depository:depoid), 0 w razie niepowodzenia 
     16 *    
     17 *  @throws Exception - SoapFault 
     18 */ 
     19Int deleteProduct(Array data) 
     20 
     21?> 
     22}}} 
     23 
     24''' Przykłady wywołań: ''' 
     25{{{ 
     26#!php 
     27 
     28// Plik MyService.php umieszczony w apps/edokumenty. 
     29// MyService.php 
     30<?php 
     31 
     32define('EDOK_API_LOGIN', 'developer'); 
     33define('EDOK_API_PASSWORD', 'developer'); 
     34define('DEFAULT_ENTITY_SYMBOL', 'demo'); 
     35 
     36require_once('./classes/eDokumentyApi/EDokApiClient.inc'); 
     37 
     38$options = array( 
     39    'location' => 'http://{host}:{port}/eDokumentyApi.php', 
     40    "uri" => "eDokumentyAPI", 
     41    'encoding'=>'UTF-8' 
     42); 
     43         
     44$client = new EDokApiClient(NULL, $options); 
     45$client->setUser(EDOK_API_LOGIN); 
     46$client->setPass(md5(EDOK_API_PASSWORD)); 
     47$header = new SoapHeader('eDokumentyAPI', 'entity_symbol', DEFAULT_ENTITY_SYMBOL); 
     48$client->__setSoapHeaders($header); 
     49 
     50 
     51 
     52?> 
     53}}}