Closed (won't fix)
Project:
Services
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
6 May 2008 at 23:57 UTC
Updated:
24 Nov 2012 at 05:44 UTC
Jump to comment: Most recent file
Multiple requests does not seem to work via XMLRPC.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | multi-call.patch | 1.27 KB | marcingy |
| #10 | xmlrpc_server-multicall-01.patch | 1.15 KB | sanduhrs |
Comments
Comment #1
marcingy commentedPlease explain what you were doing/trying to achive?
Comment #2
greenskin commentedWe are trying to make a single xmlrpc call that requests more than one method. For example, according to the Drupal api docs the first parameter is the URL, the second is the method being requested, and additional parameters will be passed to that method (for single request). For a multiple request, the docs say that the first parameter again is the URL but the second should be an array with call arrays and the first element in the call array should be the method name and further elements should be the methods needed parameters. Unless I understand it wrong and are trying to implement it wrong, the multiple request does not work. I do not know if it is an issue with XMLRPC or whether it is a problem with Services. I am leaning towards it's an issue with Services because of the nature of the return error, though I don't remember what it was off hand.
As we are still in development with what we are building, we have currently gotten by with just making separate XMLRPC calls, but would like to find a fix for this before too long.
Comment #3
snelson commentedThe services / xmlrpc server changes very little with how core's xmlrpc functions. All it really does is pass a keyed array, as you would with normal hook_xmlrpc, to core xmlrpc. That said, its likely that is is a core issue rather than a Services issue.
This is obviously very important, however, you and your team likely have way more experience with this than myself. If you find/found its a problem with Services, do let me know and I'll be happy to work with yout to get a patch in.
Thanks,
Scott
Comment #4
greenskin commentedDrupal's xmlrpc() function does indeed work with multi-calls as the example given in #3 at #255509: xmlrpc multiple requests.
The error returned when trying to use the Services xmlrpc server when calling 'system.multicall' is 'Method system.multicall does not exist'. My best guess is that Services is rejecting the method 'system.multicall' since it is not defined as a Services method.
Comment #5
snelson commentedStrange ok, someone should have a look at this.
Services XMLRPC is actually served through Drupal's XMLRPC. The xmlrpc_server.module actually implements hook_xmlrpc and exposes the service methods through the hook to Drupal XMLRPC, so it should in theory be combining all services with methods implemented by hook_xmlrpc. It seems not to be the case, but just FYI.
Comment #6
marcingy commentedCan you provide some example calls that you are making? I have a couple of ideas where things might be going wrong.
Comment #7
marcingy commentedComment #8
greenskin commentedHere's an example.
Comment #9
scottgifford commentedsubscribing, I would love to see a working system.multicall too.
Comment #10
sanduhrsSample call:
Attached is a patch that apparently makes it working and possibly gives some hints on what is going wrong.
Comment #11
scottgifford commentedThat patch doesn't work for me. It looks like it starts to loop through all of the methods in the multicall, but then just returns the results from the first one?
Comment #12
marcingy commentedMy guess is that instead of returning on the call we need to do the following:
Note I haven't tested the concept because I don't have time to set up the required test environment to prove my theory. Patch attached. The nice thing though is that this can be happily be applied to all versions of service without issue.
Comment #13
gddI don't get why you need the $call_index, or why you need to exclude the four system functions. Can you elaborate on that? It seems like we should be able to just roll through the methods and return the merged array.
I like this functionality but I don't see it compelling enough to hold up releasing the 2.x branch over unless someone wants to drive it home and test it.
Comment #14
greenskin commentedI could be wrong but my understanding is that Services doesn't have the method 'system.multicall' registered. Would adding it to the list of available methods work?
Comment #15
gddThat is what the above patch does. Marking this postponed, but if someone gets a good patch in before a release is rolled I'll be happy to check it out.
Comment #16
marcingy commentedBumping to head
Comment #17
marcingy commentedThis is really a task not a bug
Comment #18
marcingy commentedClosing as won't fix as no feed back was given and xmlrpc is now pretty much dead in services