Forum OpenACS Q&A: Response to Tcl function call to remote AOLserver via xmlrpc ?

Andrew,

I think i fixed the -prefixed arg problem. xmlrpc_contruct was taking all args starting with - as a switch to define the variable type.

I think I see why your lists are getting screwed up.

Nsxmlrpc is not smart enough to know that you are returning a tcl list. It does not guess the xmlrpc datatype.

Now the handy part of xmlrpc and soap is that you can call the same proc locally or remotely. This fails with nsxmlrpc. The proc needs to return the proper switchs to build the xmlrpc datatypes.

You are returning [list a b c d]
What you need to do is return that as an xmlrpc datatype. ie:
return [list -struct [list a b c d]]

Another option is to build in datatype guessing into nsxmlrpc. This would be a great feature! There is probably some code that can do this in TclSOAP.

If you are serious about using xmlrpc in aolserver, I really think that TclSOAP will give you a better foundation to build on. Also, it gives you SOAP and XMLRPC in the same code.

It would need some tweaking to fix the problems with package require and aolserver, but it is certainly doable.