Re: Why not add name to the scale/array type as struct type?
Gaetano Giunta <[email protected]> Tue, 22 Nov 2011 10:19:39 +0100
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
maggie_tany <[email protected]> wrote on 22/11/2011 04:31: > > Because there is no order defined for paramters for the method, when there are more than one parameters required by the invocation, which one of the same > type, e.g. int, the only way to let the peer, rpc request processor, know the differences among these parameters is to put the scale type parameter under the > "hood" of struct type. > Sorry, I might be misunderstanding, but the order of parameters in a method call is defined and important. If the first param of a method call (eg. "buy") is an int (eg. product code) and the second is still an int (eg. product quantity), you can not just exchange them at will. Usually implementors define methods that take a single parameter, of type "structure" exactly for that reason - to be able to specify parameters using a named notation instead of a positional notation > > > Thus the struct type behaves just as a collection of named scale types or array types parameters. > > I tried to implement the rpc-xml parser and internally I tried to use a tree-like structure, however sometime which seems not efficeint for searching a > node/leave without name. Is there any better way to make it? > I guess efficiency of the structures you use depends on the language you are using, which you did not specify. In php f.e. there is no difference in the native data types uses for hashes and arrays. But what do you mean exactly when you say "searching for a node without a name"? Only xmlrpc "structs" elements have names. All other types are either scalar or have positional values (the "array") > > > Thanks a lot! > Maggie > [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/xml-rpc/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/xml-rpc/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/