mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #42692 (Procedure 'int1' not present with doc/lit SoapServer)
This commit is contained in:
parent
b2cdb92654
commit
b710c61f34
@ -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);
|
||||
|
37
ext/soap/tests/bugs/bug42692.phpt
Executable file
37
ext/soap/tests/bugs/bug42692.phpt
Executable 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
|
40
ext/soap/tests/bugs/bug42692.wsdl
Executable file
40
ext/soap/tests/bugs/bug42692.wsdl
Executable 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>
|
Loading…
Reference in New Issue
Block a user