Zmiany pomiędzy wersją 1 and wersją 2 dla DeployerGuide/Others/eDokumentyApi/AddAttachmentToDocument
- Data i czas:
- 02/08/12 13:57:21 (13 years temu)
Legend:
- Bez zmian
- Dodane
- Usunięte
- Zmienione
-
DeployerGuide/Others/eDokumentyApi/AddAttachmentToDocument
v1 v2 50 50 $client->__setSoapHeaders($header); 51 51 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; 54 56 55 57 try { 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); 65 62 66 } catch(SoapFault $fault) {67 68 var_dump($fault);69 70 63 if ($fault->faultcode < 100) { 71 64 trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);