From: Dmitry Stogov Date: Tue, 14 Dec 2004 13:58:19 +0000 (+0000) Subject: Fixed bug #30994 (SOAP server unable to handle request with references). X-Git-Tag: php-5.0.3~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d497d8f027372532bfdc244b9abb53d40e56283;p=php Fixed bug #30994 (SOAP server unable to handle request with references). --- diff --git a/NEWS b/NEWS index bd0f0eaf7e..ba43fc99a2 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ PHP NEWS - Fixed potential problems with unserializing invalid serialize data. (Marcus) - Fixed bug #31034 (Problem with non-existing iconv header file). (Derick) - Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia) +- Fixed bug #30994 (SOAP server unable to handle request with references). + (Dmitry) - Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia) - Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg) - Fixed bug #30928 (When Using WSDL, SoapServer doesn't handle private or diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 6eef78b505..873d926e65 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2800,10 +2800,13 @@ static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, c trav = body->children; while (trav != NULL) { if (trav->type == XML_ELEMENT_NODE) { +/* if (func != NULL) { soap_server_fault("Client", "looks like we got \"Body\" with several functions call", NULL, NULL, NULL TSRMLS_CC); } +*/ func = trav; + break; /* FIXME: the rest of body is ignored */ } trav = trav->next; } diff --git a/ext/soap/tests/bugs/bug30994.phpt b/ext/soap/tests/bugs/bug30994.phpt new file mode 100644 index 0000000000..7e811bbbf9 --- /dev/null +++ b/ext/soap/tests/bugs/bug30994.phpt @@ -0,0 +1,47 @@ +--TEST-- +Bug #30994 SOAP server unable to handle request with references +--SKIPIF-- + +--FILE-- + + + + + + XXX + TASKTEST + + + + + + + + + ABCabc123 + 123456 + + + + +EOF; + +function bassCall() { + return "ok"; +} + +$x = new SoapServer(NULL, array("uri"=>"http://spock/kunta/kunta")); +$x->addFunction("bassCall"); +$x->handle(); +?> +--EXPECT-- + +ok