You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by as...@ooe.net on 2002/02/17 17:06:23 UTC

XmlRpcClient & hashtables

hi!

My name is ralph and i just started to experiment with
the Apache Xml-Rpc library. since i wanted to call functions
from phpgroupware i had to extend the XmlRpcClient class
to accept hashtable parameters.
I've created a patch, so maybe you find it useful.


regards
    ralph


Re: XmlRpcClient & hashtables

Posted by as...@ooe.net.

Hannes Wallnoefer wrote:
> Ralph,
> 
> the XML-RPC spec ( http://www.xmlrpc.com/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>."
> 
> Which means that XML-RPC only supports sending parameter by order, not 
> by name. You can send named parameters within a <struct> element, but 
> the parameter list itself always is an ordered list/array.
 > In which way does phpgroupware require sending named parameters?
 >
 > Hannes
 >

Ooops. My fault, I didn't read the phpgroupware sourcecode carefully enough.

Phpgroupware requires it's parameters this way:

     Vector
       |
       +---- Hashtable
                |
	       +-------param[Name1]=value
                |
                +-------param[Name2]=value




   ralph




Re: XmlRpcClient & hashtables

Posted by as...@ooe.net.

Hannes Wallnoefer wrote:
> Ralph,
> 
> the XML-RPC spec ( http://www.xmlrpc.com/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>."
> 
> Which means that XML-RPC only supports sending parameter by order, not 
> by name. You can send named parameters within a <struct> element, but 
> the parameter list itself always is an ordered list/array.
 > In which way does phpgroupware require sending named parameters?
 >
 > Hannes
 >

Ooops. My fault, I didn't read the phpgroupware sourcecode carefully enough.

Phpgroupware requires it's parameters this way:

     Vector
       |
       +---- Hashtable
                |
	       +-------param[Name1]=value
                |
                +-------param[Name2]=value




   ralph




Re: XmlRpcClient & hashtables

Posted by Hannes Wallnoefer <ha...@helma.at>.
Ralph,

the XML-RPC spec ( http://www.xmlrpc.com/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>."

Which means that XML-RPC only supports sending parameter by order, not 
by name. You can send named parameters within a <struct> element, but 
the parameter list itself always is an ordered list/array.

In which way does phpgroupware require sending named parameters?

Hannes


astrenoir@ooe.net wrote:

>
> hi!
>
> My name is ralph and i just started to experiment with
> the Apache Xml-Rpc library. since i wanted to call functions
> from phpgroupware i had to extend the XmlRpcClient class
> to accept hashtable parameters.
> I've created a patch, so maybe you find it useful.
>
>
> regards
>    ralph
>





Re: XmlRpcClient & hashtables

Posted by Hannes Wallnoefer <ha...@helma.at>.
Ralph,

the XML-RPC spec ( http://www.xmlrpc.com/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>."

Which means that XML-RPC only supports sending parameter by order, not 
by name. You can send named parameters within a <struct> element, but 
the parameter list itself always is an ordered list/array.

In which way does phpgroupware require sending named parameters?

Hannes


astrenoir@ooe.net wrote:

>
> hi!
>
> My name is ralph and i just started to experiment with
> the Apache Xml-Rpc library. since i wanted to call functions
> from phpgroupware i had to extend the XmlRpcClient class
> to accept hashtable parameters.
> I've created a patch, so maybe you find it useful.
>
>
> regards
>    ralph
>