[RESOLVED] Fatal Error: WSService::reply() - raw post data not found
Hello, please help me debug a web service server error. I only get the error when accessing the service via SOAP. When accessing via HTTP GET the service responds correctly. You can see the HTTP communication below in blue. The PHP server code is in green. I am trying to access a test server from MS InfoPath and soapUI. In both cases I get the Fatal Error. But when accessing the URL directly with HTTP GET, it is okay.
CLIENT REQUEST
POST /ws/ws.php HTTP/1.1
SOAPAction: "http://hgbn-vm2k3/ws/ws.php/fred"
Content-Type: text/xml; charset="UTF-8"
User-Agent: SOAP Toolkit 3.0
Host: hgbn-vm2k3
Content-Length: 457
Connection: Keep-Alive
Cache-Control: no-cache
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema" xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><tnx:fred xmlns:tnx="http://www.wso2.org/php/xsd">
<tnx:inMessage>wcwqc</tnx:inMessage>
</tnx:fred></SOAP-ENV:Body></SOAP-ENV:Envelope>
----
SERVER RESPONSE
HTTP/1.1 200 OK
Date: Wed, 20 Aug 2008 14:25:04 GMT
Server: Apache/2.2.4 (Win32) PHP/5.2.2 mod_auth_sspi/1.0.4
X-Powered-By: PHP/5.2.2
Content-Length: 213
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
<br />
<b>Fatal error</b>: WSService::reply() [<a href='function.WSService-reply'>function.WSService-reply</a>]: raw post data not found in <b>W:\xitami\webpages\ws\ws.php</b> on line <b>14</b><br />
<?php
function greet($message) {
$responsePayloadString = "<greetResponse>Hello 43443!</greetResponse>";
$returnMessage = new WSMessage($responsePayloadString);
return $returnMessage;
}
function fred($inMessage) {
$returnMessage = new WSMessage($inMessage->str);
return $returnMessage;
}
$service = new WSService(array("operations" => array("greet",'fred')));
$service->reply();
?>
- Login or register to post comments
- Printer friendly version
- 213 reads











Resolved - PHP 5.5.2 bug
Upgrading PHP solved the problem