[sr-dev] XMLRPC not compliant with standard

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 19 10:43:07 CET 2012


On 11/19/12 10:38 AM, Olle E. Johansson wrote:
> I am using the XMLRPC module, so I guess it's the RPC interface and not the MI.

there is a RPC command to execute any of the MI commands, named 'mi' 
(actually there are few other variants of it). Juha's example shows the 
execution of this command - method name is 'mi' (the rpc command) and 
the parameter is 'sht_dump' (which is the mi command).

What command did you execute?

Cheers,
Daniel

>
> /O
>
> 19 nov 2012 kl. 09:44 skrev Daniel-Constantin Mierla <miconda at gmail.com>:
>
>> Hello,
>>
>> is it about native rpc commands or the execution of mi commands via rpc interface?
>>
>> The second is just an workaround, where the output of a mi command in encapsulated in a rpc response.
>>
>> Juha's example is execution of a mi command. Hopefully, at some point all mi commands will have a native rpc variant.
>>
>> Cheers,
>> Daniel
>>
>> On 11/19/12 7:46 AM, Olle E. Johansson wrote:
>>> 18 nov 2012 kl. 23:49 skrev Juha Heinanen <jh at tutpro.com>:
>>>
>>>> Olle E. Johansson writes:
>>>>
>>>>> XMLrpc standards says that there has to be ONE and only ONE structure
>>>>> in a response. When running "htable.dump" I get one param struct per
>>>>> object. There should be a common structure encapsultating all the
>>>>> responses.
>>>>> Anyone that has seen the same issues? Agree with a fix?
>>>> i don't have any problems with htable_dump at least when using python:
>>>>
>>>> # python sr-xmlrpc.py
>>>> <ServerProxy for 127.0.0.1:6060/RPC2>
>>>> Nov 19 00:46:55 sip /usr/sbin/sip-proxy[3565]: INFO: Handling XMLRPC POST from <192.98.102.10> with body <<?xml version='1.0'?><methodCall><methodName>mi</methodName><params><param><value><string>sht_dump</string></value></param><param><value><string>htable</string></value></param></params></methodCall>>
>>>> ['Entry:: 0', 'gw::3::calling_host:: foo.bar', 'Entry:: 1', 'rpi::30001::acl[0]:: 3', 'Entry:: 8', 'rpi::30001::charging_uri:: sip:+358407058050 at test.fi', 'Entry:: 11', 'rpi::30001::flags:: 209', 'Entry:: 14', 'gw::4::dpid:: 1001', 'Entry:: 15', 'lpi::20001::prefix[0]:: +3581623456', ...
>>>>
>>>> i haven't noticed any problems with php either, but i'm not using the
>>>> xmlrpc lib that comes with php.
>>> Well, it clearly breaks the XMLrpc standard, but since you have it working this way, I think we will need an optional compliant setting.
>>> I use the Code Igniter xmlrpc library and it only delivers one entry and skips the rest of the payload.
>>>
>>> /O
>>> _______________________________________________
>>> sr-dev mailing list
>>> sr-dev at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>> -- 
>> Daniel-Constantin Mierla - http://www.asipto.com
>> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-dev mailing list