cvs: pear /SOAP Server.php package.xml

From: Date: Mon, 19 Jun 2006 17:02:16 +0000
Subject: cvs: pear /SOAP Server.php package.xml
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-40822@lists.php.net to get a copy of this message
yunosh Mon Jun 19 17:02:16 2006 UTC Modified files: /pear/SOAP package.xml Server.php Log: Add parameter to SOAP_Server's service() method, to return the SOAP response data instead of sending it to the client (Request 7206). http://cvs.php.net/viewvc.cgi/pear/SOAP/package.xml?r1=1.84&r2=1.85&diff_format=u Index: pear/SOAP/package.xml diff -u pear/SOAP/package.xml:1.84 pear/SOAP/package.xml:1.85 --- pear/SOAP/package.xml:1.84 Mon Jun 19 16:38:35 2006 +++ pear/SOAP/package.xml Mon Jun 19 17:02:16 2006 @@ -44,6 +44,7 @@ <version>0.9.5</version> <date>2006-99-99</date> <notes>* Allow to enable and disable WSDL caching and to set the cache directory in the client constructor. +* Add parameter to SOAP_Server's service() method, to return the SOAP response data instead of sending it to the client (Request 7206). * Replace all invalid characters in label and variable name of the generated proxy code. (Bug 7493). * Fix subsequent failures if one transmission with a Transport class instance failed (Bug 7469).</notes> <filelist> http://cvs.php.net/viewvc.cgi/pear/SOAP/Server.php?r1=1.64&r2=1.65&diff_format=u Index: pear/SOAP/Server.php diff -u pear/SOAP/Server.php:1.64 pear/SOAP/Server.php:1.65 --- pear/SOAP/Server.php:1.64 Fri Feb 10 13:08:25 2006 +++ pear/SOAP/Server.php Mon Jun 19 17:02:16 2006 @@ -149,9 +149,16 @@ /** - * Parses request and posts response. + * Parses the request and posts or returns the response. + * + * @param string $data The SOAP request data. + * @param string $endpoint The service endpoint. Determined automatically + * if left empty. + * @param boolean $test + * @param boolean $return Whether to return the SOAP response data + * instead of sending it to the client. */ - function service($data, $endpoint = '', $test = false) + function service($data, $endpoint = '', $test = false, $return = false) { $response = null; $attachments = array(); @@ -233,6 +240,13 @@ } } + if ($return) { + if ($this->fault) { + $response = $this->fault->message(); + } + return $response; + } + $this->_sendResponse($response); }

« previous php.pear.cvs (#40822) next »