Exemplo n.º 1
0
// Execute a named method with the specified params.
bool XmlRpcServerConnection::executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result)
{
	XmlRpcServerMethod* method = _server->findMethod(methodName);

	if ( ! method) return false;

	method->setAuthorization(_authorization);

	method->execute(&_saddr, params, result);

	// Ensure a valid result value
	if ( ! result.valid ())
		result = std::string ();

	return true;
}
Exemplo n.º 2
0
// Execute a named method with the specified params.
bool
XmlRpcServer::executeMethod(const std::string& methodName, 
                            XmlRpcValue& params, 
                            XmlRpcValue& result)
{
  XmlRpcServerMethod* method = findMethod(methodName);

  if ( ! method) return false;

  method->execute(params, result);

  // Ensure a valid result value
  if ( ! result.valid())
      result = std::string();

  return true;
}