Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cx2x3

Pages: [1]
1
OK I found the problem - XMLRPC doesn't like C#'s ArrayList - I changed it to a normal string array and now it works :-)

            string[] analysisNames = new string[] { "KoDO.DiscCauses", "CallDistrDO.AnsDistrPerDay"};

thanks!

2
this is the code I'm using .. maybe someone can spot the problem.. it crashes on the second last line where the call is made to GetStats

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using CookComputing.XmlRpc;

namespace AstrixMonitor
{
    [XmlRpcUrl("http://QueueMetricsServer:8080/QueueMetrics/xmlrpc.do")]
    public interface IQueueMetrics
    {
        [XmlRpcMethod("QM.stats")]
        Object GetStats(string queueNames,
                        string userName, string password,
                        string logfile, string period, // always leave these 2 X fields blank
                        string startOfPeriod, string endOfPeriod, //yyyy-mm-dd.hh.mm.ss (do not forget the dot between the date and the hour)
                        string agentFilter,
                        string analysisNames);
    }
 
    public partial class Monitor : Form
    {
        DataSet dsDropped;
        DataTable tblDropped;

        public Monitor()
        {
            InitializeComponent();
            GetData();
            dataGridView1.DataSource = dsDropped;
            dataGridView1.DataMember = "tblDropped";
        }

        private void GetData()
        {
            ArrayList analysisNames = new ArrayList();
            analysisNames.Add("KoDO.DiscCauses");
            //analysisNames.Add("CallDistrDO.AnsDistrPerDay");

            IQueueMetrics QueueMetrics = (IQueueMetrics)XmlRpcProxyGen.Create(typeof(IQueueMetrics));
            Object result = QueueMetrics.GetStats("9002", "robot", "robot", "", "",
                                                    "2009-08-12.00.00.00",
                                                        "2009-08-14.00.00.00", "", analysisNames.ToString());
            MessageBox.Show(result.ToString());


        }
    }
}

3
any help here guys?

I have enable my robot user and now i'm using robot to connect but still get the same errors?

Is it maybe something to do with the ArrayList that QM.stats expects as a the last parameter .. Is a .net ArrayList the same as a Java ArrayList ?

4
Thanks all.. I am trying to call the QM.stats method

in the examples - they use an Java ArrayList .. if I use a C#/.Net ArrayList I get a "Parameter count mismatch." error

also tried to just change it to string but then I get another error...

Server returned a fault exception: [-1] redstone.xmlrpc.XmlRpcException: The method cannot be found. Signature: java.lang.String java.lang.String java.lang.String java.lang.String java.lang.String java.lang.String java.lang.String java.lang.String java.lang.String


has anyone got .net (VB or C#) code that works for this method (QM.stats)

5
Has anyone tried to get XmlRpc working in .Net ? .. I need some pointers and sample code just to get started .. do we need to install something on our server? or what would be the default location for this xmlrpc.do page?

Pages: [1]