]> granicus.if.org Git - php/commitdiff
Fixed bug #37278 (SOAP not respecting uri in __soapCall)
authorDmitry Stogov <dmitry@php.net>
Thu, 25 May 2006 08:14:28 +0000 (08:14 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 25 May 2006 08:14:28 +0000 (08:14 +0000)
NEWS
ext/soap/soap.c
ext/soap/tests/bugs/bug37278.phpt [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index 64713291f20de9ec53243a0f8f4d9d585b23f528..07531340032dfb14716977f9148a558db110ce77 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -81,6 +81,7 @@ PHP                                                                        NEWS
 - Fixed bug #37313 (sigemptyset() used without including <signal.h>).
   (jdolecek)
 - Fixed bug #37306 (max_execution_time = max_input_time). (Dmitry)
+- Fixed Bug #37278 (SOAP not respecting uri in __soapCall). (Dmitry)
 - Fixed bug #37256 (php-fastcgi dosen't handle connection abort). (Dmitry)
 - Fixed bug #37244 (Added strict flag to base64_decode() that enforces 
   RFC3548 compliance). (Ilia)
index 22931b6e4bdd8e41a5127b9404251a334f788684..c853372c2e6425161b8bca3b3931aa1a96b0fc98 100644 (file)
@@ -2663,7 +2663,7 @@ PHP_METHOD(SoapClient, __call)
 
                        if (zend_hash_find(ht, "uri", sizeof("uri"), (void**)&tmp) == SUCCESS &&
                            Z_TYPE_PP(tmp) == IS_STRING) {
-                               soap_action = Z_STRVAL_PP(tmp);
+                               uri = Z_STRVAL_PP(tmp);
                        }
                } else if (Z_TYPE_P(options) != IS_NULL) {
                        php_error_docref(NULL TSRMLS_CC, E_ERROR, "first parameter must be string or null");
diff --git a/ext/soap/tests/bugs/bug37278.phpt b/ext/soap/tests/bugs/bug37278.phpt
new file mode 100755 (executable)
index 0000000..15ef3c9
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+Bug #37278 (SOAP not respecting uri in __soapCall)
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$options = array(
+  "location" => "test://",
+  "uri"      => "http://bricolage.sourceforge.net/Bric/SOAP/Auth",
+  "trace"    => 1);
+
+$client = new SoapClient(null, $options);
+
+$newNS = "http://bricolage.sourceforge.net/Bric/SOAP/Story";
+
+try {
+  $client->__soapCall("list_ids", array(), array("uri" => $newNS));
+} catch (Exception $e) {
+  print $client->__getLastRequest();
+}
+?>
+--EXPECT--
+<?xml version="1.0" encoding="UTF-8"?>
+<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://bricolage.sourceforge.net/Bric/SOAP/Story" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:list_ids/></SOAP-ENV:Body></SOAP-ENV:Envelope>
\ No newline at end of file