bug42086.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. --TEST--
  2. Bug #42086 (SoapServer return Procedure '' not present for WSIBasic compliant wsdl)
  3. --EXTENSIONS--
  4. soap
  5. --INI--
  6. soap.wsdl_cache_enabled=0
  7. --FILE--
  8. <?php
  9. $request = <<<EOF
  10. <?xml version="1.0" encoding="UTF-8"?>
  11. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><firstFunctionWithoutParam/></SOAP-ENV:Body></SOAP-ENV:Envelope>
  12. EOF;
  13. class firstFunctionWithoutParamResponse {
  14. public $param;
  15. }
  16. function firstFunctionWithoutParam() {
  17. $ret = new firstFunctionWithoutParamResponse();
  18. $ret->param = "firstFunctionWithoutParam";
  19. return $ret;
  20. }
  21. $server = new SoapServer(__DIR__.'/bug42086.wsdl',
  22. array('features'=>SOAP_SINGLE_ELEMENT_ARRAYS));
  23. $server->addFunction('firstFunctionWithoutParam');
  24. $server->handle($request);
  25. ?>
  26. --EXPECT--
  27. <?xml version="1.0" encoding="UTF-8"?>
  28. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><firstFunctionWithoutParamReturn><param>firstFunctionWithoutParam</param></firstFunctionWithoutParamReturn></SOAP-ENV:Body></SOAP-ENV:Envelope>