QueueMetrics > Running QueueMetrics
Does anyone have the XML RPC API working with 1.3.3?
QueueMetrics:
I am running this on the latest 1.3.3 using a standard Windows Python 2.4 install. I am no Python guru so if you know how to get the exact version numbers of components I'll be glad to help.
I do this:
>>> url = "http://10.10.3.100:8080/queuemetrics/xmlrpc.do"
>>> server = xmlrpclib.Server( url )
>>> res = server.QM.stats( "queue-dps", "robot", "robot","", "","2005-10-10.10:23:12", "2007-10-10.10:23:10","", ['KoDO.DiscCauses', 'CallDistrDO.AnsDistrPerDay' ] )
>>> res.keys()
['CallDistrDO.AnsDistrPerDay', 'result', 'KoDO.DiscCauses']
And get no errors - in fact the keys are correct results.
If I try running the method:
>>> server.system.listMethods
Traceback (most recent call last):
File "<pyshell#7>", line 1, in -toplevel-
server.system.listMethods
File "C:\Programmi\Python24\lib\xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "C:\Programmi\Python24\lib\xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "C:\Programmi\Python24\lib\xmlrpclib.py", line 1147, in request
return self._parse_response(h.getfile(), sock)
File "C:\Programmi\Python24\lib\xmlrpclib.py", line 1286, in _parse_response
return u.close()
File "C:\Programmi\Python24\lib\xmlrpclib.py", line 744, in close
raise Fault(**self._stack[0])
Fault: <Fault -1: 'The specified handler cannot be found'>
I get the error message - most likely it means QM does not support XML-RPC methods autodiscovery.
Are you sure that your URL http://127.0.0.1:8080/qm130 is the correct URL for QM 1.3.3? if you use your browser and enter the address http://127.0.0.1:8080/qm130/qm_start.do does this lead you to the Authentication page?
Please keep us posted.
chaag:
Success! (and embarrassment)
In my lame understanding of Tomcat, I had somehow assumed /qm130/ was actually meaningful, rather than simply how the example instance had been set up. Works great when I use a valid URL.
Apologies for such a silly question.
Thanks for the help
QueueMetrics:
You are welcome! we love those bugs that aren't! :)
Navigation
[0] Message Index
[*] Previous page
Go to full version