Comment 2 for bug 1074817

Revision history for this message
Austin Bingham (austin-bingham) wrote : Re: [Bug 1074817] Re: xml-rpc-method-call-async doesn't trigger callback with correct results

Yes, that seems to fix the small example I attached. Unfortunately I
don't have anything more substantial to test it with now.

On Wed, Mar 5, 2014 at 10:23 AM, Alex Bennée <email address hidden> wrote:
> I found a similar problem which seems to manifest itself on newer
> version of emacs (and the URL library). Can you try the following patch
> and see if it works for you?
>
> https://github.com/stsquad/xml-
> rpc/commit/38c573158a0dc2950a5ea26a37644ffe19fd4f3d
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1074817
>
> Title:
> xml-rpc-method-call-async doesn't trigger callback with correct
> results
>
> Status in An XML-RPC library for Emacs:
> New
>
> Bug description:
> I'm not sure if I'm doing something wrong, if there's a bug in xml-
> rpc, or if perhaps there's a bug in some lower-level functionality
> (e.g. url-http). In any event, I don't seem to be getting the correct
> results when I make an asynchronous call with xml-rpc-method-call-
> async. My callback is only ever called with nil, never with the return
> value of the remote method.
>
> The remote call works just fine when I use synchronous calls, so I
> assume that the basic connectivity and plumbing works. There just
> seems to be a problem getting return values.
>
> Here's an example of what doesn't work:
>
> ----
>
> (defun simple-cb (rslt)
> (message (format "simple-cb: %s" rslt)))
>
> (defun canned-call-async ()
> "This does not work. simple-cb is only ever called with nil."
> (xml-rpc-method-call-async
> 'simple-cb
> "http://www.cookcomputing.com/xmlrpcsamples/RPC2.ashx"
> 'examples.getStateName
> 41))
>
> (defun canned-call-sync ()
> "This does work. I correctly get back South Dakota."
> (message
> (format
> "sync result: %s"
> (xml-rpc-method-call
> "http://www.cookcomputing.com/xmlrpcsamples/RPC2.ashx"
> 'examples.getStateName
> 41))))
>
> ----
>
> Is there anything obviously wrong with what I'm doing? Or am I correct
> in expecting simple-cb to be called with the remote functions return
> result?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/xml-rpc-el/+bug/1074817/+subscriptions