
Hello, I am trying to get a handle on nusoap, so far so good except I have a little error issue. I am trying to run an example and get the following error.
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Invalid at the top level of the document. Error processing resource 'https://myserver/soap/client_example.php'. Line 1, Position 1
Error = Response not of type text/xml<xmp>POST /echoStringServer.php HTTP/1.0
^
is anyone familiar/know why I might be getting this error. I am running apache, and am running nusoap. the code is as follows.
//client_example.php
<?php
require('nusoap.php');
$myString = "hello my name is adam";
$paramters = array($myString);
$s = new soapclient('https://myserver/soap/echoStringServer.php');
$result = $s->call('echoString',$parameters);
if(!$err = $s->getError()){
echo 'Result = '.$result;
}else{
echo 'Error = '.$err;
}
echo '<xmp>'.$s->request.'</xmp>';
echo '<xmp>'.$s->response.'</xmp>';
?>
//server_example.php
<?php
require('nusoap.php');
$s->register('echoString');
function echoString($inputString);{
if(is_string($inputString)){
return $inputString;
}else{
return new soap_fault('Client','','The parameter to this service must be a string.');
}
}
$s->service($HTTP_RAW_POST_DATA);
?>
any help would be much apreciated
Thankyou so much!