blob: e97345fdaab025cb587536dd78eeb14b1c9f3c8f (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
--TEST--
Bug #73237 "Any" data missing when result includes a struct
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--
soap.wsdl_cache_enabled=0
--FILE--
<?php
class LocalSoapClient extends SoapClient {
function __doRequest($request, $location, $action, $version, $one_way = 0) {
return <<<EOF
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:test.example.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:object.test.example.org"><soapenv:Body><queryResponse><result xsi:type="QueryResult"><done>true</done><queryLocator xsi:nil="true"/><records xsi:type="sf:genericObject"><sf:type>CampaignMember</sf:type><sf:Id>00vi0000011VMgeAAG</sf:Id><sf:Id>00vi0000011VMgeAAG</sf:Id><sf:CampaignId>701i0000001lreeAAA</sf:CampaignId><sf:Status>Sent</sf:Status><sf:ContactId xsi:nil="true"/><sf:LeadId>00Qi000001UrbYFEAZ</sf:LeadId><sf:Contact xsi:nil="true"/><sf:Lead xsi:type="sf:genericObject"><sf:type>Lead</sf:type><sf:Id xsi:nil="true"/><sf:Email>angela.lansbury@cbs.com</sf:Email></sf:Lead></records><size>1</size></result></queryResponse></soapenv:Body></soapenv:Envelope>
EOF;
}
}
$client = new LocalSoapClient(dirname(__FILE__)."/bug73237.wsdl");
var_dump($client->query(""));
?>
--EXPECT--
object(stdClass)#2 (1) {
["result"]=>
object(stdClass)#3 (4) {
["done"]=>
string(4) "true"
["queryLocator"]=>
NULL
["records"]=>
object(SoapVar)#6 (4) {
["enc_type"]=>
int(0)
["enc_value"]=>
object(stdClass)#4 (3) {
["type"]=>
string(14) "CampaignMember"
["Id"]=>
array(2) {
[0]=>
string(18) "00vi0000011VMgeAAG"
[1]=>
string(18) "00vi0000011VMgeAAG"
}
["any"]=>
array(2) {
[0]=>
string(175) "<sf:CampaignId>701i0000001lreeAAA</sf:CampaignId><sf:Status>Sent</sf:Status><sf:ContactId xsi:nil="true"/><sf:LeadId>00Qi000001UrbYFEAZ</sf:LeadId><sf:Contact xsi:nil="true"/>"
["Lead"]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
}
}
["enc_stype"]=>
string(13) "genericObject"
["enc_ns"]=>
string(27) "urn:object.test.example.org"
}
["size"]=>
string(1) "1"
}
}
|