Forum OpenACS Q&A: Re: XML RPC Validator

Collapse
5: Re: XML RPC Validator (response to 1)
Posted by Iuri Sampaio on
Hello Antonio,
Nice to read your post. Currently I'm working on fundamentals, setting up xml-rpc in a box with Naviserver and OACS 5.9.

I've created a new package (i.e. application) and added a few /tcl/ad-procs with some basic samples, requests and responses such as: authentications, sum() and helloworld() functions;

I'm following the documentation available at xml-rpc/www/doc/index.html. Any help is appreciated.

Once the basics get settle, the goal will be to bring IATA NDC XML standard into OACS as a package library perhaps.

Feel free to register at www.iurix.com. I'll give SWA. At ndc.iurix.com/ you will see the webservice application. The index page calls xml_rpc .

catch {xmlrpc::remote_call www.iurix.com/RPC2 system.add -int 4 -int 44} result

That catch returns a few errors within error.log. Somehow it's related to ns_xml and tdom. I'm still debugging it.

Should we keep this thread as a raw documentation source?

Best wishes

Collapse
6: Re: XML RPC Validator (response to 5)
Posted by Antonio Pisano on
Hello Iuri,

yesterday I took the chance to refresh my background on this kind of technologies. I am resuming my findings, sorry if I write things you already know:
- XML-RPC is the ancestor of SOAP, which is a more feature rich specification for this kind of remote calls. I have dealt with SOAP in the past, but didn't know about this. [1]
- XML-RPC is not the most throughput-efficient technology around: XML must be parsed back and forth all the time, with computational and bandwidth overhead. This holds also for SOAP. [1] [2]
- Most if not all the things you can achieve with XML-RPC/SOAP could be done by a simple HTTP API, or better by a RESTful webservice [1] [2] [3]
- HTTP API is not a RESTful webservice [4] [5]

This brought to me the following questions/considerations I want to debate with you (and maybe others) before we proceed:
- is XML-RPC a requirement for you? I mean, do you have to interact with applications that speak XML-RPC only? Why don't go with plain HTTP calls?
- as we are considering to revamp this old package, shouldn't we go all the way down including also SOAP in the mix?

More specifical to your problem:
- XML-RPC package relies on ns_xml module, which I don't know. Is it available for naviserver? How does it differ from tdom?

[1] https://en.wikipedia.org/wiki/SOAP
[2] https://en.wikipedia.org/wiki/XML-RPC
[3] https://web.archive.org/web/20130511053512/http://joncanady.com/blog/2010/01/14/if-you-have-rest-why-xml-rpc/
[4] http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
[5] https://en.wikipedia.org/wiki/HATEOAS

Antonio