bug39832.phpt 999 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #39832 (SOAP Server: parameter not matching the WSDL specified type are set to 0)
  3. --EXTENSIONS--
  4. soap
  5. --INI--
  6. soap.wsdl_cache_enabled=0
  7. --FILE--
  8. <?php
  9. $HTTP_RAW_POST_DATA = <<<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://test.pl"><SOAP-ENV:Body>
  12. <SOAP-ENV:Test>
  13. <parameters priority="high">
  14. <ns1:NetworkErrorCode>1</ns1:NetworkErrorCode>
  15. </parameters>
  16. </SOAP-ENV:Test></SOAP-ENV:Body></SOAP-ENV:Envelope>
  17. EOF;
  18. function Test($x) {
  19. return $x->priority;
  20. }
  21. $x = new SoapServer(__DIR__."/bug39832.wsdl");
  22. $x->addFunction("Test");
  23. $x->handle($HTTP_RAW_POST_DATA);
  24. ?>
  25. --EXPECT--
  26. <?xml version="1.0" encoding="UTF-8"?>
  27. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SOAP-ERROR: Encoding: Violation of encoding rules</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>