Advertisement
Guest User

DiscountManager soap client

a guest
Jun 10th, 2013
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. <?php
  2. ini_set('memory_limit','512M');
  3. ini_set('display_errors', true);
  4. error_reporting(E_ALL);
  5. /**
  6.  * Load autoload
  7.  */
  8. require_once dirname(__FILE__) . '/my_soap_server_Autoload.php';
  9.  
  10. define('MY_SOAP_WSDL_URL','../DiscountManager.xml');
  11. define('MY_SOAP_USER_LOGIN','');
  12. define('MY_SOAP_USER_PASSWORD','');
  13. /**
  14.  * Wsdl instanciation infos
  15.  */
  16. $wsdl = array();
  17. $wsdl[MySoapWsdlClass::WSDL_URL] = MY_SOAP_WSDL_URL;
  18. $wsdl[MySoapWsdlClass::WSDL_CACHE_WSDL] = WSDL_CACHE_NONE;
  19. $wsdl[MySoapWsdlClass::WSDL_TRACE] = true;
  20. if(MY_SOAP_USER_LOGIN !== '')
  21.     $wsdl[MySoapWsdlClass::WSDL_LOGIN] = MY_SOAP_USER_LOGIN;
  22. if(MY_SOAP_USER_PASSWORD !== '')
  23.     $wsdl[MySoapWsdlClass::WSDL_PASSWD] = MY_SOAP_USER_PASSWORD;
  24. // etc....
  25. /**
  26.  * Examples
  27.  */
  28.  
  29.  
  30. /*********************************
  31.  * Example for MySoapServicePing
  32.  */
  33. $mySoapServicePing = new MySoapServicePing($wsdl);
  34. // sample call for MySoapServicePing::Ping()
  35.  
  36. $request = new MySoapStructPingRequest();
  37.  
  38. if($mySoapServicePing->Ping(new MySoapStructPing(
  39.         $request
  40. ))) {
  41.     print_r($mySoapServicePing->getResult());
  42.     print_r($mySoapServicePing->getLastRequest());
  43. }else
  44.     print_r($mySoapServicePing->getLastError());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement