Good day,
I am having trouble passing an xml in nusoap.
sample:
I pass this xml <test>123</test>
The nusoap response is test123/test
The greater than and less than sign is removed.
This is my code for the server:
require_once('nusoap/nusoap.php');
$server = new nusoap_server; // Create server instance
$server->configureWSDL('demows','http://example.org/demo');
$server->register('myFunction',
array("param"=>"xsd:string"), // input
array("result"=>"xsd:string"), // output
'http://example.org/demo'
);
function myFunction($parameters) {
return $parameters;
}
// Use the request to try to invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA: '';
$server->service($HTTP_RAW_POST_DATA);
This is my code for the client:
require_once('nusoap/nusoap.php');
$client = new nusoap_client('http://localhost/nusoap/ws.php?wsdl', true);
$clientparam = '<test>123</test>';
$result = $client->call('myFunction',
array('param'=>$clientparam)
);
print_r($result);
*Note that the above code is working on PHP Version 5.3.0 but NOT on PHP Version 5.2.0-8+etch13 which is the one on our production is using.
I've search the net for any issues on the 2 version but none found. Any help is highly appreciated. TIA