From: Dmitry Stogov Date: Wed, 18 Jun 2008 07:23:58 +0000 (+0000) Subject: Fixed SOAP binding selection X-Git-Tag: php-5.3.0alpha1~728 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5429bfb51861786efa13a1edb741ed4b4e4970fd;p=php Fixed SOAP binding selection --- diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 07c3b5d657..fcc90aa742 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -722,12 +722,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) } trav2 = trav2->next; } - if (!address) { + if (!address || tmpbinding->bindingType == BINDING_HTTP) { if (has_soap_port || trav->next || i < n-1) { efree(tmpbinding); trav = trav->next; continue; - } else { + } else if (!address) { soap_error0(E_ERROR, "Parsing WSDL: No address associated with "); } } diff --git a/ext/soap/tests/bugs/bug29109.phpt b/ext/soap/tests/bugs/bug29109.phpt index 8f028d71b7..3b13974d07 100644 --- a/ext/soap/tests/bugs/bug29109.phpt +++ b/ext/soap/tests/bugs/bug29109.phpt @@ -10,11 +10,7 @@ $client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); var_dump($client->__getFunctions()); ?> --EXPECT-- -array(3) { +array(1) { [0]=> string(53) "HelloWorldResponse HelloWorld(HelloWorld $parameters)" - [1]=> - string(19) "string HelloWorld()" - [2]=> - string(19) "string HelloWorld()" } \ No newline at end of file diff --git a/ext/soap/tests/bugs/multiport.phpt b/ext/soap/tests/bugs/multiport.phpt new file mode 100644 index 0000000000..0b5e944514 --- /dev/null +++ b/ext/soap/tests/bugs/multiport.phpt @@ -0,0 +1,16 @@ +--TEST-- +Proper binding selection +--SKIPIF-- + +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- + true, 'exceptions' => false)); +$response = $client->GetSessionId(array('userId'=>'user', 'password'=>'password')); +echo $client->__getLastRequest(); +?> +--EXPECT-- + +userpassword diff --git a/ext/soap/tests/bugs/multiport.wsdl b/ext/soap/tests/bugs/multiport.wsdl new file mode 100644 index 0000000000..604e963d81 --- /dev/null +++ b/ext/soap/tests/bugs/multiport.wsdl @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +