server019.phpt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. SOAP Server 19: compressed request (gzip)
  3. --EXTENSIONS--
  4. soap
  5. zlib
  6. --SKIPIF--
  7. <?php
  8. if (php_sapi_name()=='cli') echo 'skip';
  9. ?>
  10. --INI--
  11. precision=14
  12. --GZIP_POST--
  13. <SOAP-ENV:Envelope
  14. SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  15. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  16. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  17. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  18. xmlns:si="http://soapinterop.org/xsd">
  19. <SOAP-ENV:Body>
  20. <ns1:test xmlns:ns1="http://testuri.org" />
  21. </SOAP-ENV:Body>
  22. </SOAP-ENV:Envelope>
  23. --FILE--
  24. <?php
  25. function test() {
  26. return "Hello World";
  27. }
  28. $server = new soapserver(null,array('uri'=>"http://testuri.org"));
  29. $server->addfunction("test");
  30. $server->handle();
  31. echo "ok\n";
  32. ?>
  33. --EXPECT--
  34. <?xml version="1.0" encoding="UTF-8"?>
  35. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
  36. ok