25

What is the best Javascript XML-RPC client library in your opinion and why?

I'am making a JQuery app and I need to communicate with my xmlrpc server with it.

Found following libraries, but I have no idea what are their pros and cons:

http://www.zentus.com/js/xmlrpc.js.html

http://www.scottandrew.com/xml-rpc/

http://phpxmlrpc.sourceforge.net/jsxmlrpc/

http://www.vcdn.org/Public/XMLRPC/

http://mimic-xmlrpc.sourceforge.net/

Frank Bannister
  • 3,197
  • 5
  • 20
  • 10

7 Answers7

6

There is a Google-hosted library here: http://code.google.com/p/json-xml-rpc/. It supports both XML-RPC and JSON-RPC for JavaScript, and asynchronous as well as synchronous requests. I'm about to try out the XML-RPC for JavaScript myself with a JQuery UI and will update this based on my findings.

Chris B.
  • 2,532
  • 1
  • 15
  • 9
  • 1
    Seems that you cannot use XML-RPC protocol for cross-domain calls with this library. :( – Ries Jan 28 '10 at 14:35
  • 3
    else if(this.__protocol == 'XML-RPC') throw Error("Unable to use the XML-RPC protocol to access services on other domains."); – Ries Jan 28 '10 at 14:37
  • 1
    This seem to do the job very well. works on all major browsers. Great pair with Zope and Plone! – esamatti Jul 15 '10 at 11:07
2

There are two new libraries that I recently published for doing XML-RPC over JavaScript. One works with jQuery, one is plain JavaScript for modern browsers.

Tim Heap
  • 1,671
  • 12
  • 11
1

I've had good luck with jsolait (specifically its 'xmlrpc' module), although the project appears to be dead now.

1

I have tried http://www.zentus.com/js/xmlrpc.js.html myself. It has problems parsing the result in FireFox and Chrome, parsing the result in IE worked fine.

I have not tried the others, but 'mimic' looks great (if it works).

For my own problem, I've switched to JSON instead of XMLRPC.

theller
  • 2,809
  • 19
  • 19
  • Actually I've switched to JSON also. Mainly because I need JSONP abilities. But any how, it would be nice read more comments about these. – Frank Bannister Aug 01 '09 at 10:08
1

For XML-RPC client calls in JavaScript to a remote server, I successfully used the RedStone XML-RPC library:

I was interfacing it with Python on the other side, I had to do a minor correction to the library though:

//  python xml-rpc does not has a handler name
var message = '<?xml version="1.0"?><methodCall><methodName>' + ((this.handlerName!="")?(this.handlerName + '.'):"") +  method + '</methodName>';
phant0m
  • 16,595
  • 5
  • 50
  • 82
0

The protocol is rather easy, are you sure you need a library at all? Maybe just send the XML the protocol requires?

Emil Stenström
  • 13,329
  • 8
  • 53
  • 75
0

Adding a library to the list. I found this one quite easy to use, although I haven't tried all of the others that are mentioned.

BlackShift
  • 2,296
  • 2
  • 19
  • 27