Zmiany pomiędzy wersją 1 and wersją 2 dla DeployerGuide/Others/eDokumentyApi/AddAttachmentToDocument

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

--

Legend:

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

    v1 v2  
    5050$client->__setSoapHeaders($header); 
    5151 
    52 // Tworzy kontakt 
    53 $contid = NULL; 
     52$fileContent = base64_encode(file_get_contents('test.pdf')); 
     53$fileName = 'test.pdf';  
     54$documentId = 768; 
     55$out = NULL; 
    5456 
    5557try { 
    56     $data = array( 
    57         'name_1' => 'SOAP TEST'.date('d H:m:s'), 
    58         'name_2' => 'SOAPTEST', 
    59         'nip___' => 1111111111, 
    60         'street' => 'Główna',        
    61         'symbol' => 'FGH99' 
    62     ); 
    63     $contid = $client->createContact($data); 
    64     var_dump($contid); 
     58    $out = $client->addAttachmentToDocument($fileContent, $fileName, $documentId); 
     59    var_dump($out); 
     60} catch(SoapFault $fault) { 
     61    var_dump($fault); 
    6562 
    66 } catch(SoapFault $fault) { 
    67      
    68     var_dump($fault); 
    69      
    7063    if ($fault->faultcode < 100) { 
    7164        trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);