I am having problem using the HTTP_POST_RAW_DATA variable, and perhaps someone maybe able to help me out
I am trying to test this nuSOAP application- originally based on a tutorial on Zend. But, I am unable to send any information from the SOAP server. Here's the code for SOAP server:
PHP:
<?php_
require_once('nusoap.php');_
$server=new_soap_server;
$server->register('taxCalc');_
function_taxCalc($rate,$sub){_
_____if($rate==''||$rate<=0){_
_______return_soap_fault('Client','','Must supply positive non zero tax rate, ','');
_______}
______if($sub==''||$sub<=0){
________return_soap_fault('Client','','Must supply a positive non zero tax rate, ','');_
________}
_______return(($rate/100)*$sub)+$sub;
____}
$server->service($SERVER['HTTP_RAW_POST_DATA']);
exit();
?>____
and the SOAP client
PHP:
<?_
require_once('nusoap.php');_
$param=array('rate'=>$GET['rate'],'sub'=>$GET['sub']);_
$client=new_soapclient('http://localhost/taxCalc.php');_
$response=$client->call('taxCalc',$param);
if($client->fault){
echo"FAULT: <p>Code:{$client->faultcode}<br/>";
echo"string:{$client->faultstring}";
}else{
echo"$".$response;
__}_
?>_
The $response variable is unable to receive any information. How can I make sure that the HTTP_RAW_POST_DATA is functional on PHP 4.2, running on Mac OS X.
Many thanks in advance.