Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer)

This commit is contained in:
Dmitry Stogov 2007-11-13 15:10:16 +00:00
parent b2cdb92654
commit b710c61f34
3 changed files with 78 additions and 0 deletions

View File

@ -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);

View File

@ -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

View File

@ -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>