xref: /PHP-5.3/ext/soap/tests/bugs/bug42183.phpt (revision 610c7fbe)
1--TEST--
2Bug #42183 (classmap cause crash in non-wsdl mode )
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7class PHPObject {
8}
9
10$req = <<<EOF
11<?xml version="1.0" encoding="UTF-8"?>
12<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>
13EOF;
14
15function test() {
16	return new PHPObject();
17}
18
19$server = new SoapServer(NULL, array('uri' => 'http://ws.sit.com',
20	'classmap' => array('Object' => 'PHPObject')));
21$server->addFunction("test");
22ob_start();
23$server->handle($req);
24ob_end_clean();
25echo "ok\n";
26--EXPECT--
27ok
28