From 3f0c2347ff5f583f00ef5ef8f5190a32ed05ec93 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 14 Dec 2004 13:58:57 +0000 Subject: [PATCH] Fixed bug #30994 (SOAP server unable to handle request with references). --- ext/soap/soap.c | 3 ++ ext/soap/tests/bugs/bug30994.phpt | 47 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ext/soap/tests/bugs/bug30994.phpt 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 -- 2.50.1