|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-27 16:40 UTC] roderja at hotmail dot com
Description:
------------
Run the web services server, and got the following messgae.
"Can't find HTTP_RAW_POST_DATA"
I put the server1.php and its myservice.wsdl at the same folder. Thanks.
Reproduce code:
---------------
<?php
function SayHello() {
return 'Hello';
}
ini_set("soap.wsdl_cache_enabled", "0");
$server = new SoapServer("myservice.wsdl");
$server->addFunction("getQuote");
$server->handle();
Expected result:
----------------
Hello
Actual result:
--------------
<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
- <SOAP-ENV:Body>
- <SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Bad Request. Can't find HTTP_RAW_POST_DATA</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Which SAPI are you using? Try: $data = file_get_contents('php://input'); $server->handle($data);Thank you it works. I am a beginner and y environment is : windows xp sp2 XAMPP 1.5.1 .Update MySQL 5.0.18 .Update Apache 2.2.0 .Update PHP 5.1.1 .Update phpMyAdmin 2.7.0 pl1 Could you please tell me the following question where can I find the answer? When I survey at www.php.net it tell me how the function difinition, but I don't know how to combine them together. for example, why do you know add that two code is works? I want to know where can I learn these kinds of good information. I appreciate. 1. I don't know what kind of SAPI did I use. 2. Does the following code is just only good for server and client at the same machine? $data = file_get_contents('php://input'); $server->handle($data);