diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c
index 2b781e868ef..7b0465f1f2a 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 00000000000..f5501ac9bdc
--- /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 00000000000..f4cae2554e4
--- /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
+
+
+
+
+
+