I just run some tests with a client built on the libxmlrpc-c3 (the same used on the server side in openser). When sending a command without params, the message looks like:

<?xml version="1.0" ?>
<methodCall>
        <methodName>domain_dump</methodName>
        <params></params>
</methodCall>


and works ok... so this is not the problem..sorry for misleading you...your php library does it right.

regards,
bogdan

Dan Pascu wrote:

On Friday 08 December 2006 14:00, Juha Heinanen wrote:
i still have problem with empty params list.  if there is no params, my
php library produces an empty params list:

POST /RPC2 HTTP/1.0
Host: 127.0.0.1
Connection: close
User-Agent: OpenSIPg XML_RPC Client
Content-Type: text/xml; charset=ISO-8859-1
Content-Length: 112

<?xml version="1.0" ?>
<methodCall>
        <methodName>domain_dump</methodName>
        <params></params>
</methodCall>

the spec says:

If the procedure call has parameters, the <methodCall> must contain a
<params> sub-item. The <params> sub-item can contain any number of
<param>s, each of which has a <value>.

it does not say that <params></params> cannot be there if there are no
params.

I think your request is correct. The params tag need to be there even if there are no arguments. The request you sent represents a call to domain_dump() (i.e. a function with no parameters) Every xmlrpc library I've seen encodes a call to a function without parameters like above.



_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to