Advertisement
czhujer

nuSOAP

Dec 3rd, 2014
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. $client = new nusoap_client("http://hujer.info/shitws/Service.asmx?WSDL", "wsdl");
  2.  
  3. #hnuskod
  4.  
  5. if( !is_object($client) ){
  6.      echo "ERROR neni wobject...(asi blba URL)"
  7.      exit(123) #or return false
  8. }
  9.  
  10. #lepsi metoda:
  11. $err = $client->getError();
  12. if ($err) {
  13.  echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
  14.  echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
  15.  exit();
  16. }
  17.  
  18. $ret2 = $client->setCredentials($username,$password, "basic");
  19.  
  20. #"standart"
  21. if( strlen($ret2) > 0){
  22.   echo "prihlaseni selhalo...salala (".$ret2.")"
  23.   exit(46)
  24. }
  25.  
  26. #asi lepsi
  27. $err3 = $client->getError();
  28. if ($err3) {
  29.  echo '<h2>Constructor error</h2><pre>' . $err3 . '</pre>';
  30.  echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>';
  31.  exit();
  32. }
  33.  
  34. #call
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement