Advertisement
Guest User

Untitled

a guest
Dec 8th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. //$user="Reconik";
  4. //$pass="#PzyA2qkL";
  5.  
  6.  
  7. $user="TestPubliczny";
  8. $pass="1234abcd";
  9.  
  10. $wsdl = 'https://uslugaterytws1test.stat.gov.pl/wsdl/terytws1.wsdl';
  11.  
  12. $soap_options = array(
  13. 'ws-security-login' => $user,
  14. 'ws-security-password' => $pass,
  15. 'soap_version' => SOAP_1_1,
  16. 'cache_wsdl' => WSDL_CACHE_MEMORY,
  17. 'encoding' => 'utf8',
  18. 'keep_alive' => false,
  19. 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
  20. );
  21.  
  22. $client= new SoapClient($wsdl, $soap_options);
  23.  
  24. try {
  25.  
  26. $result = $client->PobierzSlownikCechULIC();
  27. var_dump($result);
  28. } catch (SoapFault $exception) {
  29. var_dump($exception);
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement