1--TEST-- 2Bug #42692 (Procedure 'int1' not present with doc/lit SoapServer) 3--SKIPIF-- 4<?php require_once('skipif.inc'); ?> 5--FILE-- 6<?php 7ini_set('soap.wsdl_cache_enabled','0'); 8 9function checkAuth($peid,$auth) { 10 return $peid; 11} 12 13class TestSoap extends SoapClient { 14 15 function __construct($wsdl, $options) { 16 parent::__construct($wsdl, $options); 17 $this->server = new SoapServer($wsdl, $options); 18 $this->server->addFunction("checkAuth"); 19 } 20 21 function __doRequest($request, $location, $action, $version, $one_way = 0) { 22 ob_start(); 23 $this->server->handle($request); 24 $response = ob_get_contents(); 25 ob_end_clean(); 26 return $response; 27 } 28} 29 30$client = new TestSoap(__DIR__ . "/bug42692.wsdl", array("trace"=>1)); 31try { 32 $result = $client->checkAuth(1,"two"); 33 echo "Auth for 1 is $result\n"; 34} catch (Exception $e) { 35 echo $e->getMessage(); 36} 37?> 38--EXPECT-- 39Auth for 1 is 1 40