private Hashtable GenericXMLRPCRequest(Hashtable ReqParams, string method)
{
ArrayList SendParams = new ArrayList();
SendParams.Add(ReqParams);
// Send Request
XmlRpcResponse Resp;
try
{
XmlRpcRequest Req = new XmlRpcRequest(method, SendParams);
Resp = Req.Send(m_ProfileServer, 30000);
}
catch (WebException ex)
{
MainConsole.Instance.ErrorFormat("[PROFILE]: Unable to connect to Profile " +
"Server {0}. Exception {1}", m_ProfileServer, ex);
Hashtable ErrorHash = new Hashtable();
ErrorHash["success"] = false;
ErrorHash["errorMessage"] = "Unable to fetch profile data at this time. ";
ErrorHash["errorURI"] = "";
return ErrorHash;
}
catch (SocketException ex)
{
MainConsole.Instance.ErrorFormat(
"[PROFILE]: Unable to connect to Profile Server {0}. Method {1}, params {2}. " +
"Exception {3}", m_ProfileServer, method, ReqParams, ex);
Hashtable ErrorHash = new Hashtable();
ErrorHash["success"] = false;
ErrorHash["errorMessage"] = "Unable to fetch profile data at this time. ";
ErrorHash["errorURI"] = "";
return ErrorHash;
}
catch (XmlException ex)
{
MainConsole.Instance.ErrorFormat(
"[PROFILE]: Unable to connect to Profile Server {0}. Method {1}, params {2}. " +
"Exception {3}", m_ProfileServer, method, ReqParams.ToString(), ex);
Hashtable ErrorHash = new Hashtable();
ErrorHash["success"] = false;
ErrorHash["errorMessage"] = "Unable to fetch profile data at this time. ";
ErrorHash["errorURI"] = "";
return ErrorHash;
}
if (Resp.IsFault)
{
Hashtable ErrorHash = new Hashtable();
ErrorHash["success"] = false;
ErrorHash["errorMessage"] = "Unable to fetch profile data at this time. ";
ErrorHash["errorURI"] = "";
return ErrorHash;
}
Hashtable RespData = (Hashtable)Resp.Value;
return RespData;
}