i am currently having problems on xmlrpc i am using node-xmlrpc and it fails when htable.dump returns more than 1 row. i raised this issue on the node-xmlrpc group and this is the explanation i got.
Each <value> node inside <param> is supposed to only have one child node, so this looks like an invalid response. The<value> should (probably, i don't know your use case) contain an <array> with <data> wrapped around the structs. Seehttp://xmlrpc.scripting.com/spec.html
does this mean kamailio is not following standards?
here is the working response:
<methodResponse> <params> <param> <value><struct><member><name>entry</name><value><int>6</int></value></member><member><name>size</name><value><int>1</int></value></member><member><name>slot</name><value><struct><member><name>item</name><value><struct><member><name>name</name><value><string>4::num</string></value></member><member><name>value</name><value><int>1</int></value></member></struct></value></member></struct></value></member></struct> </value> </param> </params> </methodResponse>
here is the non-working response:
<methodResponse> <params> <param> <value><struct><member><name>entry</name><value><int>6</int></value></member><member><name>size</name><value><int>1</int></value></member><member><name>slot</name><value><struct><member><name>item</name><value><struct><member><name>name</name><value><string>4::num</string></value></member><member><name>value</name><value><int>1</int></value></member></struct></value></member></struct></value></member></struct> <struct><member><name>entry</name><value><int>11</int></value></member><member><name>size</name><value><int>1</int></value></member><member><name>slot</name><value><struct><member><name>item</name><value><struct><member><name>name</name><value><string>3::num</string></value></member><member><name>value</name><value><int>1</int></value></member></struct></value></member></struct></value></member></struct> </value> </param> </params> </methodResponse>
Kelvin Chua
Kelvin Chua writes:
i am currently having problems on xmlrpc i am using node-xmlrpc and it fails when htable.dump returns more than 1 row. i raised this issue on the node-xmlrpc group and this is the explanation i got.
Each <value> node inside <param> is supposed to only have one child node, so this looks like an invalid response. The<value> should (probably, i don't know your use case) contain an <array> with <data> wrapped around the structs. Seehttp://xmlrpc.scripting.com/spec.html
does this mean kamailio is not following standards?
see if this thread gives any glues:
http://lists.sip-router.org/pipermail/sr-users/2014-March/081865.html
-- juha
thanks juha i was able to apply the RET_ARRAY fix to htable.dump in 4.0.5 however unable to share the patch as htable_rpc[] is nowhere to be found on trunk was there any changes from 4.0.x to trunk with regards to rpc?
Kelvin Chua
On Sun, Mar 30, 2014 at 8:37 AM, Juha Heinanen jh@tutpro.com wrote:
Kelvin Chua writes:
i am currently having problems on xmlrpc i am using node-xmlrpc and it fails when htable.dump returns more than 1 row. i raised this issue on the node-xmlrpc group and this is the explanation
i
got.
Each <value> node inside <param> is supposed to only have one child node, so this looks like an invalid response. The<value> should (probably, i don't know your use case) contain an <array> with <data> wrapped around
the
structs. Seehttp://xmlrpc.scripting.com/spec.html
does this mean kamailio is not following standards?
see if this thread gives any glues:
http://lists.sip-router.org/pipermail/sr-users/2014-March/081865.html
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Kelvin Chua writes:
i was able to apply the RET_ARRAY fix to htable.dump in 4.0.5 however unable to share the patch as htable_rpc[] is nowhere to be found on trunk was there any changes from 4.0.x to trunk with regards to rpc?
see
rpc_export_t htable_rpc[] = { {"htable.dump", htable_rpc_dump, htable_dump_doc, 0}, {"htable.delete", htable_rpc_delete, htable_delete_doc, 0}, {"htable.get", htable_rpc_get, htable_get_doc, 0}, {"htable.sets", htable_rpc_sets, htable_sets_doc, 0}, {"htable.seti", htable_rpc_seti, htable_seti_doc, 0}, {"htable.listTables", htable_rpc_list, htable_list_doc, 0}, {"htable.reload", htable_rpc_reload, htable_reload_doc, 0}, {"htable.stats", htable_rpc_stats, htable_stats_doc, 0}, {0, 0, 0, 0} };
in htable.c.
if you don't have write access to the repo, make the change and if it works in your tests, i can apply the patch.
-- juha
forgot to give feedback on this issue, here's a patch.
--- modules/htable/htable.c 2014-08-15 23:49:34.064455715 -0700 +++ modules/htable.c 2014-08-15 23:50:17.640626126 -0700 @@ -1105,7 +1105,7 @@ }
rpc_export_t htable_rpc[] = { - {"htable.dump", htable_rpc_dump, htable_dump_doc, 0}, + {"htable.dump", htable_rpc_dump, htable_dump_doc, RET_ARRAY}, {"htable.delete", htable_rpc_delete, htable_delete_doc, 0}, {"htable.get", htable_rpc_get, htable_get_doc, 0}, {"htable.sets", htable_rpc_sets, htable_sets_doc, 0},
Kelvin Chua
On Wed, Apr 2, 2014 at 2:32 PM, Juha Heinanen jh@tutpro.com wrote:
Kelvin Chua writes:
i was able to apply the RET_ARRAY fix to htable.dump in 4.0.5 however unable to share the patch as htable_rpc[] is nowhere to be found
on
trunk was there any changes from 4.0.x to trunk with regards to rpc?
see
rpc_export_t htable_rpc[] = { {"htable.dump", htable_rpc_dump, htable_dump_doc, 0}, {"htable.delete", htable_rpc_delete, htable_delete_doc, 0}, {"htable.get", htable_rpc_get, htable_get_doc, 0}, {"htable.sets", htable_rpc_sets, htable_sets_doc, 0}, {"htable.seti", htable_rpc_seti, htable_seti_doc, 0}, {"htable.listTables", htable_rpc_list, htable_list_doc, 0}, {"htable.reload", htable_rpc_reload, htable_reload_doc, 0}, {"htable.stats", htable_rpc_stats, htable_stats_doc, 0}, {0, 0, 0, 0} };
in htable.c.
if you don't have write access to the repo, make the change and if it works in your tests, i can apply the patch.
-- juha
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thanks. It should have been fixed a while agon with commit 67fa31e3f01c4d70ad9561949bca4aaa230d0f46
Cheers, Daniel
On 16/08/14 08:53, Kelvin Chua wrote:
forgot to give feedback on this issue, here's a patch.
--- modules/htable/htable.c2014-08-15 23:49:34.064455715 -0700 +++ modules/htable.c 2014-08-15 23:50:17.640626126 -0700 @@ -1105,7 +1105,7 @@ } rpc_export_t htable_rpc[] = { -{"htable.dump", htable_rpc_dump, htable_dump_doc, 0}, +{"htable.dump", htable_rpc_dump, htable_dump_doc, RET_ARRAY}, {"htable.delete", htable_rpc_delete, htable_delete_doc, 0}, {"htable.get", htable_rpc_get, htable_get_doc, 0}, {"htable.sets", htable_rpc_sets, htable_sets_doc, 0},
Kelvin Chua
On Wed, Apr 2, 2014 at 2:32 PM, Juha Heinanen <jh@tutpro.com mailto:jh@tutpro.com> wrote:
Kelvin Chua writes: > i was able to apply the RET_ARRAY fix to htable.dump in 4.0.5 > however unable to share the patch as htable_rpc[] is nowhere to be found on > trunk > was there any changes from 4.0.x to trunk with regards to rpc? see rpc_export_t htable_rpc[] = { {"htable.dump", htable_rpc_dump, htable_dump_doc, 0}, {"htable.delete", htable_rpc_delete, htable_delete_doc, 0}, {"htable.get", htable_rpc_get, htable_get_doc, 0}, {"htable.sets", htable_rpc_sets, htable_sets_doc, 0}, {"htable.seti", htable_rpc_seti, htable_seti_doc, 0}, {"htable.listTables", htable_rpc_list, htable_list_doc, 0}, {"htable.reload", htable_rpc_reload, htable_reload_doc, 0}, {"htable.stats", htable_rpc_stats, htable_stats_doc, 0}, {0, 0, 0, 0} }; in htable.c. if you don't have write access to the repo, make the change and if it works in your tests, i can apply the patch. -- juha _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 30 Mar 2014, at 17:37, Juha Heinanen jh@tutpro.com wrote:
Kelvin Chua writes:
i am currently having problems on xmlrpc i am using node-xmlrpc and it fails when htable.dump returns more than 1 row. i raised this issue on the node-xmlrpc group and this is the explanation i got.
Each <value> node inside <param> is supposed to only have one child node, so this looks like an invalid response. The<value> should (probably, i don't know your use case) contain an <array> with <data> wrapped around the structs. Seehttp://xmlrpc.scripting.com/spec.html
does this mean kamailio is not following standards?
see if this thread gives any glues:
http://lists.sip-router.org/pipermail/sr-users/2014-March/081865.html
As stated earlier Kamailio does not follow the XML-RPC standard. From time to time I tried to fix this, but got lost in the source code and never completed the work.
It is a problem when integrating with xmlrpc libraries.
/O