server020.phpt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. --TEST--
  2. SOAP Server 20: compressed request (deflate)
  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. --DEFLATE_POST--
  13. <?xml version="1.0" encoding="ISO-8859-1"?>
  14. <SOAP-ENV:Envelope
  15. SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  16. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  17. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  18. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  19. xmlns:si="http://soapinterop.org/xsd">
  20. <SOAP-ENV:Body>
  21. <ns1:test xmlns:ns1="http://testuri.org" />
  22. </SOAP-ENV:Body>
  23. </SOAP-ENV:Envelope>
  24. --FILE--
  25. <?php
  26. function test() {
  27. return "Hello World";
  28. }
  29. $server = new soapserver(null,array('uri'=>"http://testuri.org"));
  30. $server->addfunction("test");
  31. $server->handle();
  32. echo "ok\n";
  33. ?>
  34. --EXPECT--
  35. <?xml version="1.0" encoding="UTF-8"?>
  36. <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>
  37. ok