diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-11-13 15:10:16 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-11-13 15:10:16 +0000 |
commit | b710c61f34f6719c673a1229c590e2a7a362144d (patch) | |
tree | 741dc4b76658d45ba60f21371bb80c2e260a32a9 /ext/soap | |
parent | b2cdb9265496410ce25bd63257ff9a4c5a16a139 (diff) | |
download | php-git-b710c61f34f6719c673a1229c590e2a7a362144d.tar.gz |
Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer)
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 1 | ||||
-rwxr-xr-x | ext/soap/tests/bugs/bug42692.phpt | 37 | ||||
-rwxr-xr-x | ext/soap/tests/bugs/bug42692.wsdl | 40 |
3 files changed, 78 insertions, 0 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d981396a00..437c529e49 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -4487,6 +4487,7 @@ static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params) break; } zend_hash_move_forward((*tmp)->requestParameters); + node = node->next; } if (ok /*&& node == NULL*/) { return (*tmp); diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt new file mode 100755 index 0000000000..6511556b58 --- /dev/null +++ b/ext/soap/tests/bugs/bug42692.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #42692 (Procedure 'int1' not present with doc/lit SoapServer) +--FILE-- +<?php +ini_set('soap.wsdl_cache_enabled','0'); + +function checkAuth($peid,$auth) { + return $peid; +} + +class TestSoap extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->addFunction("checkAuth"); + } + + function __doRequest($request, $location, $action, $version) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } +} + +$client = new TestSoap(dirname(__FILE__) . "/bug42692.wsdl", array("trace"=>1)); +try { + $result = $client->checkAuth(1,"two"); + echo "Auth for 1 is $result\n"; +} catch (Exception $e) { + echo $e->getMessage(); +} +?> +--EXPECT-- +Auth for 1 is 1 diff --git a/ext/soap/tests/bugs/bug42692.wsdl b/ext/soap/tests/bugs/bug42692.wsdl new file mode 100755 index 0000000000..c8928e30d0 --- /dev/null +++ b/ext/soap/tests/bugs/bug42692.wsdl @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="netDB"
+ targetNamespace="urn:netDB"
+ xmlns:typens="urn:netDB"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <message name="checkAuthIN">
+ <part name="peid" type="xsd:integer" />
+ <part name="auth" type="xsd:string" />
+ </message>
+ <message name="checkAuthOUT">
+ <part name="peidx" type="xsd:integer" />
+ </message>
+ <portType name="netDB">
+ <operation name="checkAuth">
+ <input message="typens:checkAuthIN" />
+ <output message="typens:checkAuthOUT" />
+ </operation>
+ </portType>
+ <binding name="netDB" type="typens:netDB">
+ <soap:binding type="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="checkAuth">
+ <soap:operation soapAction="urn:checkAuth" />
+ <input>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:netDB" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
+ </output>
+ </operation>
+ </binding>
+ <service name="netDB">
+ <port name="netDBPort" binding="typens:netDB">
+ <soap:address location="http://netdb.alphawest.com.au/xml/soap/server.php"/>
+ </port>
+ </service>
+</definitions>
|