Forum OpenACS Q&A: xmlrpc module for the ACS
from arsdigita. You can find it at
Validates correctly at http://validator.xmlrpc.com
Works with both ACS and openACS (3.x) except with the ACS you need to
patch ns_getform to ignore POST's of text/xml content type.
Search for xmlrpc_proc in the file to look at examples of how to write
functions for xmlrpc.
Any feedback is appreciated.
SOAP would be nice too. I haven't heard of anyone working on a SOAP module, and have no idea how hard it'd be it implement.
That is how Frontier handles it and it seems like a good idea. That said, I am willing to help on getting this working. I also implemented XML-RPC using nsxml based originally on Steve Ball's tclXML and Aaron Swartz's fixes.
Thanks for the comments!
Sure I wouldn't mind porting the stuff to ACS 4.0 as well as helping out with some other stuff. Question is - how do I get openACS 4.0 builds? For that matter how do I get access to the latest builds of openACS?
I tried looking for docs and postings about how the contribution process is and couldn't find anything. Ok I admit I wasn't looking that hard. But something in the documentation section would be good. <P>
If someone could post something I could write it up myself.
It looks like the xmlrpc.tcl file no longer validates properly at validator.xmlrpc.com. Didn't they tweak the specs a little while back? It look like it's related to the multi-level nesting stuff, but I'm not sure b/c reading through the proc is making my head spin...*grin*...great job!
If you're getting it to validate, please let me know...maybe I've screwed something up. If not, any ideas on fixing? I'd LOVE to use it...(heck, I'm gonna use it...it's still partially validating even now...)
Dave, is your implementation available for "public consumption"?? I'm having some validation problems with hafeez's that he's helping me work though; it may be an cfg problem on my machine, or it may be a 3.0->3.2 AOLserver issue (hafeez's module validates on AOLserver 3.0). I'd love to be able to try yours, and see what happens. I might be able to confirm where my problem lies.
Hmmm...Dave, I'm getting a pretty obvious error at validator.xmlrpc.com:
Ooh, a nasty error: invalid command name "ns_xml_getChildren"
Grepping the tar file, I see a 2 references to "ns_xml_getChildren" in ns_xml-rpc.tcl, but no definition. I see a ns_xml_getChildrenTrim...is that it? Any ideas? Thanks to both you and hafeez in advance...you're doing all the hard work! *grin*
Excellent!! My validation prbs with hafeez's implementation were simply a result of not using nsd8x (thanks for the quick catch, hafeez!). All is well now on that front. Still getting the same error with your procs, though, Dave. I'm reading through the ns_xml-procs.tcl and ns_xml-rpc.tcl, and trying to compare/contrast to Steve Ball's code (as a reference)...I'll get my head wrapped around it eventually.
Of course, as of right now, I need to be porting bookmarks to ACS4...maybe I'd better do that first...*grin*. But the whole idea of an XML-RPC/SOAP interface into ACS4 would be awesome! Something like Dave Winer's xmlStorage would be almost trivial (famous last words!) with ACS file-storage as the backend. We've got the data storage, we've got the the procs on the backend to interact with the database. Wire in XML-RPC (or SOAP), and you're there!
You're right, though, this is exciting stuff and one of the first things to drool over after we get the basic toolkit ported over.
Note that little "after" word...
While fixing the proc with the wrong name, I also found two more bugs. I took that code and applied it to my server which does validate. Thanks for the feedback. Hopefully I will have more time to work on it to make it better after the porting is done.
- Adding the introspection and multicall rpc procs
- Adding overloading
- Adding parameter checking and fault return in case inproper calls
- Other various stuff I've already started but thought I'd check to see if anyone has input and if not if I should put my ideas out for comment. I don't want to detract from rollout though so should I wait to post more for little while?
You might start a new thread to find out what kind of other features folks might want. A lot of folks will probably miss your comment in this old thread ...