PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » SOAP » Bug #7206

Adding new SOAP_Server option

Details

Request #7206Adding new SOAP_Server option
Submitted2006-03-26 21:21 UTC
Fromjhannus at php dot net
Assignedyunosh
StatusClosed
PackageSOAP
PHP VersionIrrelevant
OSNA
Roadmaps(Not assigned)

Comments

[2006-03-26 21:21 UTC] jhannus at php dot net

Description:
------------
Hi, I have a small feature request for SOAP/Server.php....

It would be nice to have the *option* of SOAP_Server::service() to return the xml response instead of just sending it. This would help anyone who would like to embed SOAP_Server into their applications.

I've attached a patch that adds another option "send_response" that you can pass to the constructor. Setting this option to false will cause service() to just return the xml response.

One might disagrees with this approach as it changes the return type of service() from void to mixed. But I dont think thats much of a problem in PHP. Another approach would be to add another method to SOAP_Server that does this, leaving service() alone, which, I would be happy to write if that were the preferred choice.

Thanks,
-Justin Hannus

Test script:
---------------
see patch:
http://www.128kb.com/projects/downloads/soap_server.patch