summaryrefslogtreecommitdiff
path: root/ext/soap/tests/bugs/bug42183.phpt
blob: d34311f26ce843d50fe11325621fc2338eefaa41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
Bug #42183 (classmap cause crash in non-wsdl mode )
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class PHPObject {
}

$req = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.sit.com" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope>
EOF;

function test() {
	return new PHPObject();
}

$server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com', 
	'classmap' => array('Object' => 'PHPObject')));
$server->addFunction("test");
ob_start();
$server->handle($req);
ob_end_clean();
echo "ok\n";
--EXPECT--
ok