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