note 89156 added to soapclient.soapcall

From: Date: Tue, 24 Feb 2009 15:15:54 +0000
Subject: note 89156 added to soapclient.soapcall
Groups: php.notes 
Request: Send a blank email to php-notes+get-151069@lists.php.net to get a copy of this message
I found interesting ?bug? while doing a soap client wrapper here at work. Here is my implementation of __call in class extending native SoapClient public function __call($sFunction, $aArguments = array()) { if(!$this->isAvailable($sFunction)) { return $this->returnError('Could not find requested function', "SOAP method {$sFunction} could not be found on the server. Available methods: ".print_r($this->aAvailableFunctions,1)); } $this->sLastFunctionCall = $sFunction; //for logging purposes try { $mResult = $this->__soapCall($sFunction, $aArguments); } catch (SoapFault $e) { $mResult = $e; } return $this->parseResult($mResult); } Now lets assume that encoding object passed to the method is missing some arguments. We would expect something like this: SOAP-ERROR: Encoding: object hasn't 'customer' property And now from a class level higher if I will do ($this->oSOAPClient variable points at object of class that extends native SoapClient, so the function __call above is called): return $this->mLastResponse = $this->oSOAPClient->$sMethodName($aParameters); This will return the error fine - php is validating the input internally If I will do: $this->mLastResponse = call_user_func_array(array($this->oSOAPClient, $sMethodName), $aParameters); This return is not returned, imput is not validated and the soap call gets sent. Anyone have an idea why? ---- Server IP: 92.48.74.199 Probable Submitter: 212.158.8.163 ---- Manual Page -- http://www.php.net/manual/en/soapclient.soapcall.php Edit -- https://master.php.net/note/edit/89156 Del: integrated -- https://master.php.net/note/delete/89156/integrated Del: useless -- https://master.php.net/note/delete/89156/useless Del: bad code -- https://master.php.net/note/delete/89156/bad+code Del: spam -- https://master.php.net/note/delete/89156/spam Del: non-english -- https://master.php.net/note/delete/89156/non-english Del: in docs -- https://master.php.net/note/delete/89156/in+docs Del: other reasons-- https://master.php.net/note/delete/89156 Reject -- https://master.php.net/note/reject/89156 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151069) next »