Forum OpenACS Q&A: Problem with ns_xmlrpc

Collapse
Posted by Nick Carroll on
Hi,

I've been trying to use the xmlrpc_call method from the ns_xmlrpc API.  However the server keeps timing out, and returns a value of -1.  I believe the XML-RPC call times out because of a problem with detecting the proxy server.  Is there a way to set the proxy server in the XML-RPC module?  Or anywhere else in OpenACS or the AOLServer config file?

I have tested the same XML-RPC method with the XML-RPC Frontier perl client.  The client required among other things, a value for the proxy server.  By passing in the proxy server the XML-RPC method returned the correct value.  By leaving out the proxy server value, the method times out.  Therefore I'm assuming that the xmlrpc_call method times out because it doesn't know about the proxy server.

Thanks,
Nick.

Collapse
2: Re: Problem with ns_xmlrpc (response to 1)
Posted by Dave Bauer on
Sorry, ns_xmlrpc is incomplete. It doesn't have any provision to pass options to ns_httpget/post.

I am not sure if ns_httpget/post accept these options. That would be the first place to look, to see if the AOLserver http API allows that.

Collapse
3: Re: Problem with ns_xmlrpc (response to 1)
Posted by Nick Carroll on
Hi Dave,

I've noticed in other threads that you are working on a TclSoap project.  Would you be able to tell me how I could use TclSoap for an OpenACS application?  Can I just place the TclSoap files in my Tcl directory and rename them with the -procs.tcl extension?

Thanks,
Nick.

Collapse
4: Re: Problem with ns_xmlrpc (response to 1)
Posted by Dave Bauer on
If you gather up all the pieces and rename them so they load in order it will run. I think the best way to use TclSOAP is to just load all the code into the initial interpreter with the rest of OpenACS. Currently that means you will be using the HTTP package included with Tcl instead of the AOLserver HTTP procedures.

Also it required ns_expat and ns_tcldom. I am not sure if they  will compile with AOLserver 3.5 or 3.4.

I think a better way would be to add and XML abstraction that allowed you to use whatever XML parser you were already using with AOLServer. Either ns_xml or in the future ns_tdom probably. Or allow OpenACS to work with nstcldom. But as far as I know noone is maintaining that.

Anyway, all I did was run some of the samples included with TclSOAP for soap and xmlrpc. They did work but I did not do any work to integrate with OpenACS at all. Ideally there would be some acs-service-contract magic to import and export methods that is beyond me.

Also it seems like AOLserver could some day be more compatible with standard tcl packages, but currently it is a challange to make it all work.