bug29795.phpt 1021 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Bug #29795 (SegFault with Soap and Amazon's Web Services)
  3. --EXTENSIONS--
  4. soap
  5. --INI--
  6. soap.wsdl_cache_enabled=1
  7. --FILE--
  8. <?php
  9. class LocalSoapClient extends SoapClient {
  10. function __construct($wsdl, $options) {
  11. parent::__construct($wsdl, $options);
  12. }
  13. function __doRequest($request, $location, $action, $version, $one_way = 0): ?string {
  14. return <<<EOF
  15. <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  16. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  17. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  18. xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><Price><Amount>3995</Amount><CurrencyCode>USD</CurrencyCode></Price></SOAP-ENV:Body></SOAP-ENV:Envelope>
  19. EOF;
  20. }
  21. }
  22. $client = new LocalSoapClient(__DIR__."/bug29795.wsdl",array("trace"=>1));
  23. $ar=$client->GetPrice();
  24. echo "o";
  25. $client = new LocalSoapClient(__DIR__."/bug29795.wsdl",array("trace"=>1));
  26. $ar=$client->GetPrice();
  27. echo "k\n";
  28. ?>
  29. --EXPECT--
  30. ok