Annotation of embedaddon/php/ext/soap/tests/bugs/bug42326.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #42326 (SoapServer crash)
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
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/" xmlns:ns1="http://www.example.com/"><SOAP-ENV:Body><ns1:GetProductsRequest><time></time></ns1:GetProductsRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
12: EOF;
13:
14:
15: $soap_admin_classmap = array('productDetailsType' => 'SOAP_productDetailsType',
16: 'GetProductsRequest' => 'SOAP_GetProductsRequest',
17: 'GetProductsResponse' => 'SOAP_GetProductsResponse');
18:
19: class SOAP_productDetailsType {
20: public $id = 0;
21: }
22:
23: class SOAP_GetProductsRequest {
24: public $time = '';
25: }
26:
27: class SOAP_GetProductsResponse {
28: public $products;
29: function __construct(){
30: $this->products = new SOAP_productDetailsType();
31:
32: }
33: }
34:
35: class SOAP_Admin {
36: public function GetProducts($time){
37: return new SOAP_GetProductsResponse();
38: }
39: }
40:
41: $soap = new SoapServer(dirname(__FILE__).'/bug42326.wsdl', array('classmap' => $soap_admin_classmap));
42: $soap->setClass('SOAP_Admin');
43: ob_start();
44: $soap->handle($request);
45: ob_end_clean();
46: echo "ok\n";
47: ?>
48: --EXPECT--
49: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>