Question Zend_Xml_Rpc_Server

0 like 0 dislike
2 views
The problem, pass in the xml-rpc client argument a string(just a string!), a server comes an array of one element with this value, following code, someone tell me what this is I would be very grateful, even below accidentally found a temporary solution which I don't like because it's either a bug or something, when something may stop working.

The client implementation
$urlXmlRpcServer = 'http://example.com/xml-rpc';
try
{
$xmlRpcClient = new Zend_XmlRpc_Client($urlXmlRpcServer);
$class = $xmlRpcClient->getProxy();
$check = $class->needString($value);
}
catch(Exception $e)
{}

Server implementation
/**
* function needString
* @param string $string
*/
needString function($string)
{
$value = $string;
//Code
}

$server = new Zend_XmlRpc_Server();
$server->addFunction('needString');
echo $server->handle();

Workaround
/**
* function needString
* @param string $string
*/
needString function($string)
{
ob_start();
print_r($string);
$value = ob_get_clean();
//Code
}
by | 2 views

1 Answer

0 like 0 dislike
And so?
\r
$check = $class->needString(new Zend_XmlRpc_Value_String($value)); 
by

Related questions

0 like 0 dislike
2 answers
asked Jun 9, 2019 by VoisHunter
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 4, 2019 by glebvvs
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
28,660 users