bug42183.phpt 693 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #42183 (classmap cause crash in non-wsdl mode )
  3. --EXTENSIONS--
  4. soap
  5. --FILE--
  6. <?php
  7. class PHPObject {
  8. }
  9. $req = <<<EOF
  10. <?xml version="1.0" encoding="UTF-8"?>
  11. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.sit.com" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope>
  12. EOF;
  13. function test() {
  14. return new PHPObject();
  15. }
  16. $server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com',
  17. 'classmap' => array('Object' => 'PHPObject')));
  18. $server->addFunction("test");
  19. ob_start();
  20. $server->handle($req);
  21. ob_end_clean();
  22. echo "ok\n";
  23. ?>
  24. --EXPECT--
  25. ok