From: Dmitry Stogov Date: Tue, 5 Oct 2004 16:00:40 +0000 (+0000) Subject: Fixed bug #30175 (SOAP results aren't parsed correctly) X-Git-Tag: PRE_NEW_VM_GEN_PATCH~91 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb6072e10dac347cdcdeae3827cbcd46bd0b642a;p=php Fixed bug #30175 (SOAP results aren't parsed correctly) --- diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index 2b781e868e..7b0465f1f2 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -271,6 +271,9 @@ int parse_packet_soap(zval *this_ptr, char *buffer, int buffer_size, sdlFunction cur = get_node(resp, name); /* TODO: produce warning invalid ns */ } + if (!cur && fnb->style == SOAP_RPC) { + cur = resp; + } if (cur) { if (fnb->style == SOAP_DOCUMENT) { val = cur; diff --git a/ext/soap/tests/bugs/bug30175.phpt b/ext/soap/tests/bugs/bug30175.phpt new file mode 100644 index 0000000000..f5501ac9bd --- /dev/null +++ b/ext/soap/tests/bugs/bug30175.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #30175 (SOAP results aren't parsed correctly) +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + + + + +blah blah some name field +This is a description. more blah blah blah +127.0.0.1 + + + +EOF; + } + +} + +$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); +var_dump($client->qwebGetHostInfo()); +?> +--EXPECT-- +array(3) { + ["name"]=> + string(25) "blah blah some name field" + ["shortDescription"]=> + string(42) "This is a description. more blah blah blah" + ["ipAddress"]=> + string(9) "127.0.0.1" +} diff --git a/ext/soap/tests/bugs/bug30175.wsdl b/ext/soap/tests/bugs/bug30175.wsdl new file mode 100644 index 0000000000..f4cae2554e --- /dev/null +++ b/ext/soap/tests/bugs/bug30175.wsdl @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Service definition of function ns1__qwebSquare + + + + + Service definition of function ns1__qwebStrlen + + + + + Service definition of function ns1__qwebGetHostInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Demo Qweb SOAP interface + + + + + +