dmitry Mon May 21 13:14:02 2007 UTC Modified files: /php-src/ext/soap php_sdl.c /php-src/ext/soap/tests/bugs bug41337_2.phpt bug41337_2.wsdl bug41337_2_1.wsdl Log: Fixed bug #41337 WSDL parsing doesn't ignore non soap bindings http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.108&r2=1.109&diff_format=u Index: php-src/ext/soap/php_sdl.c diff -u php-src/ext/soap/php_sdl.c:1.108 php-src/ext/soap/php_sdl.c:1.109 --- php-src/ext/soap/php_sdl.c:1.108 Thu May 10 14:58:31 2007 +++ php-src/ext/soap/php_sdl.c Mon May 21 13:14:02 2007 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c,v 1.108 2007/05/10 14:58:31 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.109 2007/05/21 13:14:02 dmitry Exp $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -717,7 +717,7 @@ trav2 = trav2->next; } if (!address) { - if (has_soap_port || trav->next) { + if (has_soap_port || trav->next || i < n-1) { efree(tmpbinding); trav = trav->next; continue; http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337_2.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug41337_2.phpt diff -u /dev/null php-src/ext/soap/tests/bugs/bug41337_2.phpt:1.2 --- /dev/null Mon May 21 13:14:02 2007 +++ php-src/ext/soap/tests/bugs/bug41337_2.phpt Mon May 21 13:14:02 2007 @@ -0,0 +1,12 @@ +--TEST-- +Bug #41337 (WSDL parsing doesn't ignore non soap bindings) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +ini_set("soap.wsdl_cache_enabled",0); +$client = new SoapClient(dirname(__FILE__)."/bug41337_2.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337_2.wsdl?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug41337_2.wsdl diff -u /dev/null php-src/ext/soap/tests/bugs/bug41337_2.wsdl:1.2 --- /dev/null Mon May 21 13:14:02 2007 +++ php-src/ext/soap/tests/bugs/bug41337_2.wsdl Mon May 21 13:14:02 2007 @@ -0,0 +1,36 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <import namespace="http://linuxsrv.home/~dmitry/soap/test.wsdl" + location="bug41337_2_1.wsdl" /> + + <binding name="TestServiceBinding" type="tns:TestServicePortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> + <operation name="Add"> + <soap:operation soapAction="Add" style="rpc" /> + <input> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </input> + <output> + <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> + </output> + </operation> + </binding> + + <service name="TestService"> + <port name="TestServicePort" binding="tns:TestServiceBinding"> + <soap:address location="http://linuxsrv.home/~dmitry/soap/soap_server.php" /> + </port> + </service> + +</definitions> http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337_2_1.wsdl?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/soap/tests/bugs/bug41337_2_1.wsdl diff -u /dev/null php-src/ext/soap/tests/bugs/bug41337_2_1.wsdl:1.2 --- /dev/null Mon May 21 13:14:02 2007 +++ php-src/ext/soap/tests/bugs/bug41337_2_1.wsdl Mon May 21 13:14:02 2007 @@ -0,0 +1,47 @@ +<?xml version="1.0" ?> +<definitions + xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + 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/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://linuxsrv.home/~dmitry/soap/test.wsdl" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + + <types> + <xsd:schema targetNamespace="http://linuxsrv.home/~dmitry/soap/test.wsdl"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + </xsd:schema> + </types> + + <message name="AddRequest"> + <part name="x" type="xsd:double" /> + <part name="y" type="xsd:double" /> + </message> + <message name="AddResponse"> + <part name="result" type="xsd:double" /> + </message> + + <portType name="TestServicePortType"> + <operation name="Add"> + <input message="tns:AddRequest" /> + <output message="tns:AddResponse" /> + </operation> + </portType> + + <binding name="TestServiceBinding2" type="tns:TestServicePortType"> + <operation name="Add"> + <input/> + <output/> + </operation> + </binding> + + <service name="TestService2"> + <port name="TestServicePort2" binding="tns:TestServiceBinding"/> + </service> + +</definitions>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php