Hi everyone,

in respone to Ryan Hoegg's eMail to the yahoo groups message
(http://groups.yahoo.com/group/xml-rpc/message/5359) here are some of my
ideas.

I would like to it realized that in addition to the "desirable way" in
my last post the following methods would be recognized by a new
implementation of the invoker:

(wishes at first, implementation at second ;-))

// 1) convert Hashtable-Objects to "real" objects (Hashtable -> Entry)
public boolean addEntry(String guestbookId, Entry entry);

// 2) void methods could return true by default to adhere to the
xmlprc-spec
public void addEntry(String guestbookId, Entry entry);

// 3) return types should be converted automagically to
_Hashtable_/Vector
public Entry getEntry(String guestbookId, int index);

// 4) return types should be converted automagically to
Hashtable/_Vector_
public Entry[] getEntries(String guestbookId, int beginIndex, int
endIndex);

// 5) input parameters should be converted to corresponding Arrays
// (needs to ensure, that all <value>s of a xmlrpc <array> are of
// the same type (in this case <i4>)
public Entry[] getEntries(String guestbookId, int[] indices);

// 6) has to co-exist next to 5)
public Entry[] getEntries(String guestbookId, long[] indices;)

// 7) n-dimensional Array support:
// xmlrpc spec allows recursive definition of arrays
public int[][] calculateCrossProduct(int[][] matrix1, int[][]matrix2);



Ok. So far so good. The class Entry is very easy structured. The above
cases should work even with more complex objects.

e.g. class User {
  +String name
  +Address address
  ...
}
class Address {
  +street
  +city
  ...
}

So the invoker's code should als work with the following example method:

// 8) return type: more complex
public User[] getUserByPrimaryKey(String sessionId, PrimaryKey pk);



I know that this isn't a formal specification but it's simple ;-)


What do you people out there think about this?
(Maybe I try for myself to implement these features...?)


greets from germany,
Marcel


Reply via email to