forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbug69280.phpt
44 lines (40 loc) · 1.24 KB
/
bug69280.phpt
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--TEST--
Bug #69280 (SoapClient classmap doesn't support fully qualified class name)
--EXTENSIONS--
soap
--INI--
soap.wsdl_cache_enabled=0
--CREDITS--
champetier dot etienne at gmail dot com
--FILE--
<?php
abstract class AbstractClass {
public $prop;
}
class RealClass1 extends AbstractClass {
public $prop1;
}
class TestWS extends \SoapClient {
public function TestMethod($parameters) {
return $this->__soapCall('TestMethod', [$parameters], [
'uri' => 'http://tempuri.org/',
'soapaction' => ''
]
);
}
public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false): never {
die($request);
}
}
$a = new TestWS(__DIR__ . '/bug69280.wsdl', ['classmap' => [
'AbstractClass' => '\AbstractClass',
'RealClass1' => '\RealClass1',
]]);
$r1 = new \RealClass1();
$r1->prop = "prop";
$r1->prop1 = "prop1";
$a->TestMethod($r1);
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><parameters xsi:type="ns1:RealClass1"><ns1:prop>prop</ns1:prop><ns1:prop1>prop1</ns1:prop1></parameters></SOAP-ENV:Body></SOAP-ENV:Envelope>