summaryrefslogtreecommitdiff
path: root/ext/soap/tests/interop
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-04-02 13:43:08 +0000
committerDmitry Stogov <dmitry@php.net>2007-04-02 13:43:08 +0000
commit36c6ad915bf9ce0c0894258957feb1fedad193c5 (patch)
tree2b83118d248ee4ba6743327d6a28b1a534526191 /ext/soap/tests/interop
parent24292995079373784c3ec224c9d423dd31902172 (diff)
downloadphp-git-36c6ad915bf9ce0c0894258957feb1fedad193c5.tar.gz
Fixed bug #37013 (server hangs when returning circular object references)
Diffstat (limited to 'ext/soap/tests/interop')
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt5
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt12
-rw-r--r--ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt5
-rw-r--r--ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt5
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt29
-rw-r--r--ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt24
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt6
-rw-r--r--ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt5
8 files changed, 68 insertions, 23 deletions
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt
index 0d779dc063..16e806a64a 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_015p.phpt
@@ -12,9 +12,10 @@ class SOAPStruct {
}
}
-$struct = new SOAPStruct('arg',34,325.325);
+$struct1 = new SOAPStruct('arg',34,325.325);
+$struct2 = new SOAPStruct('arg',34,325.325);
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
-$client->__soapCall("echoStructArray", array(array($struct,$struct)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
+$client->__soapCall("echoStructArray", array(array($struct1,$struct2)), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt
index 887210548b..8bcbc1bff3 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_015s.phpt
@@ -12,17 +12,21 @@ class SOAPStruct {
}
}
-$struct = new SoapVar(array(
+$struct1 = new SoapVar(array(
+ new SoapVar('arg', XSD_STRING, null, null, 'varString'),
+ new SoapVar('34', XSD_INT, null, null, 'varInt'),
+ new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat')
+ ),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd");
+$struct2 = new SoapVar(array(
new SoapVar('arg', XSD_STRING, null, null, 'varString'),
new SoapVar('34', XSD_INT, null, null, 'varInt'),
new SoapVar('325.325', XSD_FLOAT, null, null, 'varFloat')
),SOAP_ENC_OBJECT,"SOAPStruct","http://soapinterop.org/xsd");
$param = new SoapParam(new SoapVar(array(
- $struct,
- $struct
+ $struct1,
+ $struct2
),SOAP_ENC_ARRAY,"ArrayOfSOAPStruct","http://soapinterop.org/xsd"), "inputStructArray");
-$struct = new SOAPStruct('arg',34,325.325);
$client = new SoapClient(NULL,array("location"=>"test://","uri"=>"http://soapinterop.org/","trace"=>1,"exceptions"=>0));
$client->__soapCall("echoStructArray", array($param), array("soapaction"=>"http://soapinterop.org/","uri"=>"http://soapinterop.org/"));
echo $client->__getlastrequest();
diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
index 83c369dab3..a66bf99d81 100644
--- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
+++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt
@@ -12,9 +12,10 @@ class SOAPStruct {
}
}
-$struct = new SOAPStruct('arg',34,325.325);
+$struct1 = new SOAPStruct('arg',34,325.325);
+$struct2 = new SOAPStruct('arg',34,325.325);
$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0));
-$client->echoStructArray(array($struct,$struct));
+$client->echoStructArray(array($struct1,$struct2));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round2_base.inc");
diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
index f6b67f2ba7..ac8387e951 100644
--- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt
@@ -11,9 +11,10 @@ class SOAPStruct {
$this->varFloat = $f;
}
}
-$struct = new SOAPStruct('arg',34,325.325);
+$struct1 = new SOAPStruct('arg',34,325.325);
+$struct2 = new SOAPStruct('arg',34,325.325);
$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0));
-$client->echoStructArray(array($struct,$struct));
+$client->echoStructArray(array($struct1,$struct2));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round3_groupD_import3.inc");
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
index e66bbb7a21..c3c609f13f 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt
@@ -1,7 +1,7 @@
--TEST--
SOAP Interop Round3 GroupE List 005 (php/wsdl): echoLinkedList (cyclic)
--SKIPIF--
-<?php require_once('skipif.inc'); die('skip cyclic stuctures are not supported yet'); ?>
+<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class SOAPList {
@@ -22,9 +22,9 @@ echo "ok\n";
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
object(stdClass)#7 (3) {
["varInt"]=>
int(1)
@@ -43,7 +43,28 @@ object(stdClass)#7 (3) {
["varString"]=>
string(4) "arg3"
["child"]=>
- NULL
+ object(stdClass)#7 (3) {
+ ["varInt"]=>
+ int(1)
+ ["varString"]=>
+ string(4) "arg1"
+ ["child"]=>
+ object(stdClass)#8 (3) {
+ ["varInt"]=>
+ int(2)
+ ["varString"]=>
+ string(4) "arg2"
+ ["child"]=>
+ object(stdClass)#9 (3) {
+ ["varInt"]=>
+ int(3)
+ ["varString"]=>
+ string(4) "arg3"
+ ["child"]=>
+ *RECURSION*
+ }
+ }
+ }
}
}
}
diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
index 49584874d7..4c3aab74c5 100644
--- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
+++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt
@@ -1,7 +1,7 @@
--TEST--
SOAP Interop Round3 GroupE List 006 (php/wsdl): echoLinkedList (cyclic)
--SKIPIF--
-<?php require_once('skipif.inc'); die("skip cyclic stuctures are not supported yet"); ?>
+<?php require_once('skipif.inc'); ?>
--FILE--
<?php
class SOAPList {
@@ -22,16 +22,16 @@ echo "ok\n";
?>
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
-<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child xsi:nil="1" xsi:type="ns2:List"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
object(stdClass)#7 (3) {
["varInt"]=>
int(1)
["varString"]=>
string(4) "arg1"
["child"]=>
- object(stdClass)#8 (3) {
+ &object(stdClass)#8 (3) {
["varInt"]=>
int(2)
["varString"]=>
@@ -43,7 +43,21 @@ object(stdClass)#7 (3) {
["varString"]=>
string(4) "arg3"
["child"]=>
- NULL
+ object(stdClass)#8 (3) {
+ ["varInt"]=>
+ int(2)
+ ["varString"]=>
+ string(4) "arg2"
+ ["child"]=>
+ object(stdClass)#9 (3) {
+ ["varInt"]=>
+ int(3)
+ ["varString"]=>
+ string(4) "arg3"
+ ["child"]=>
+ *RECURSION*
+ }
+ }
}
}
}
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
index 0da7004009..d6e80494fa 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt
@@ -11,9 +11,11 @@ class SOAPComplexType {
$this->varFloat = $f;
}
}
-$struct = new SOAPComplexType('arg',34,325.325);
+$struct1 = new SOAPComplexType('arg',34,325.325);
+$struct2 = new SOAPComplexType('arg',34,325.325);
+$struct3 = new SOAPComplexType('arg',34,325.325);
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
-$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct,$struct,$struct)));
+$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,$struct2,$struct3)));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round4_groupI_xsd.inc");
diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
index 63f551448e..dd9f93f87f 100644
--- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
+++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt
@@ -11,9 +11,10 @@ class SOAPComplexType {
$this->varFloat = $f;
}
}
-$struct = new SOAPComplexType('arg',34,325.325);
+$struct1 = new SOAPComplexType('arg',34,325.325);
+$struct2 = new SOAPComplexType('arg',34,325.325);
$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0));
-$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct,null,$struct)));
+$client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,null,$struct2)));
echo $client->__getlastrequest();
$HTTP_RAW_POST_DATA = $client->__getlastrequest();
include("round4_groupI_xsd.inc");