Hi *,

generic types are not problem for XML RPC since collection are not generic
at runtime (ie. this is only compile time check, however some compile time
warning you will get).

Normally you have no problem to cast return values as they are mapped as
described in API docs. But with "XML RPC arrays" there are two possibilities
List and Object[] and there is no contract by the docs what exactly is the
return value (Jochen probably knows that always Object[], but since it is
not described...) I am using solution described in:
http://www.nabble.com/Are-there-any-examples-of-clients-loading-parameters-for-structs-or-arrays--to16455615.html
(see the reply)

Regards
Stano


On Mon, Apr 14, 2008 at 11:35 AM, Prasad kadbane <[EMAIL PROTECTED]>
wrote:

> Hi,
>
>       XML-RPC uses its own serialization classes to serialize object, if
> you check
> org.apache.xmlrpc.serializer package in API docs you will come to know
> that
> there are serializer classes for most of parameter types such as MAP, List
> etc.
> The map you are using may not be supported by xmlrpc but it does support
> the
> older map ie
>
> Map result = client.execute("Open.OpenEnvironment1",params);
>
> above code shld work and further when you get map just iterate that map
> and
> then try to typecast map value to List.
>
> because list object is supported by xml-rpc.
>
>
> On Mon, Apr 14, 2008 at 4:35 AM, eejimkos <[EMAIL PROTECTED]> wrote:
>
> >
> > first,tnks for your time..
> >
> > im my client i have a servlet which sends(ans receives the xml
> > response-request).the data that i send is simply 2 strings and i want
> > to take back from my server HashMap<String, List<String>>.
> > i do that:
> >
> > ....
> > HashMap<String,List<String>> result= new HashMap<String,List<String>>;
> >
> > ....
> > ....Object[] params = new Object[]{new String(x1), new String(x2)};
> >
> > try {
> > result=
> > (HashMap<String,List<String>>)client.execute("Open.OpenEnvironment1",
> > params);
> >
> > the problem is here...i can't cast to see my response since i use
> > jdk6,i have to use generics??collection??any advise??
> > --
> > View this message in context:
> >
> http://www.nabble.com/hi...problem-with-xml-rpc-java-and-tomcat-tp16669185p16669185.html
> > Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Prasad C. Kadbane.
>
> Software Engineer;
> SunGard Offshore Services(India)
> Sr.No. 108/8/1 + 2/1, S.B Road, Pune 411 053, India;
> Tel +91-20-25606000 Extn. 6117; Fax +91 20 2560 6222;
> Mobile No : 9850010620
>

Reply via email to