Advertisement
aldak

PHP example call

Feb 19th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. class Customer {
  4.     public $ID;
  5.     public $CompanyName;
  6.     public $contacts;
  7. }
  8.  
  9. class Contact {
  10.     public $ID;
  11.     public $contactType;
  12. }
  13.  
  14. class ContactType {
  15.     public $ID;
  16.     public $Name;
  17. }
  18.  
  19. $ct = new ContactType();
  20. $ct->ID = 1;
  21. $ct->Name = "email";
  22.  
  23. $con1 = new Contact();
  24. $con1->ID = 1;
  25. $con1->contactType = $ct;
  26.  
  27. $con2 = new Contact();
  28. $con2->ID = 2;
  29. $con2->contactType = $ct;
  30.  
  31. $c = new Customer();
  32. $c->ID = 1;
  33. $c->CompanyName = "compname";
  34. $c->contacts = Array($con1, $con2);
  35.  
  36. $client = new SoapClient("http://ws.dev.savvy.cz/service/TestLadon/soap/description", array('trace' => 1));
  37. $ret = $client->test($c);
  38. echo "Request:\n" . htmlentities($client->__getLastRequest()) . "<br><br>";
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement