Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. // server.php
  3.  
  4. class MyClass {
  5. public function helloWorld(){
  6. return 'Hello, ' . implode(" ",func_get_args()) . '!';
  7. }
  8. }
  9.  
  10. try{
  11. $server = new SOAPServer(
  12. NULL,
  13. array(
  14. 'uri' => 'http://localhost/soa/soap_hello/server.php'
  15. )
  16. );
  17. $server->setClass('MyClass');
  18. $server->handle();
  19. }
  20.  
  21. catch (SOAPFault $f){
  22. print $f->faultstring;
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement