Estoy desarrollando un web service con php y xml-rpc, y me da siempre ese error, utilice el script que utilice. Ademas, tambien me aparece esto otro:
Código HTML:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE>400 Bad Request</TITLE> </HEAD> <BODY> <H1>Bad Request</H1> Your browser sent a request that this server could not understand. <P> Invalid URI in request POST pruebaserver.php HTTP/1.0<P> <HR> <ADDRESS>Apache/1.3.33 Server at localhost Port 80</ADDRESS> </BODY> </HTML>
"server"
Código PHP:
<?php
$xmlRpcServer = xmlrpc_server_create();
xmlrpc_server_register_method($xmlRpcServer, 'transform','transform');
$requestXML = $HTTP_RAW_POST_DATA;
$response = xmlrpc_server_call_method ($xmlRpcServer, $requestXML, '');
header ('content-type: text/xml');
echo $response;
xmlrpc_server_destroy($xmlRpcServer);
function transform ($methodName, $params, $appData)
{
file_put_contents ('prueba.txt', 'hola mundo');
return 0;
}
?>
Código PHP:
<?php
include_once '../xmlrpc_utils/utils.php';
$host = 'localhost';
$port=80;
$uri='pruebaserver.php';
$result = xu_rpc_http_concise (
array (
'method' => 'transform',
'host' =>$host,
'uri'=>$uri,
'port'=>$port,
'debug' => TRUE
)
);
?>
Gracias