note 63201 deleted from function.soap-soapserver-handle by nlopess
| From: | nlopess@php.net | Date: | Tue, 19 Jun 2007 12:28:38 +0000 |
| Subject: | note 63201 deleted from function.soap-soapserver-handle by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127772@lists.php.net to get a copy of this message | ||
Note Submitter: ceo at l-i-e dot com
----
In PHP5, there seem to be times when handle() doesn't "work" and complains of an
Invalid Request.
This may (or may not) be only if you are using WSDL...
The root cause would seem to be that handle() expects to find the SOAP Request XML data in
$HTTP_RAW_POST_DATA
However, even turning "on" always_populate_raw_post_data does not seem to fill in that
variable.
Thus, you need to do like this, to snag the data from stdin and shove it into the variable handle()
expects:
if (!isset($HTTP_RAW_POST_DATA)){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}
YMMV