Search code examples
.netandroidweb-servicesarraylistksoap2

Return ArrayList from .net web service to android application using kSoap


My web service is returning quite a bit of data, so i'm storing it in an arraylist and returning that to my application. I don't know whether or not this is the preferred method or not. When the arraylist is returned and displayed in my application, it also displays the arraylists "anyType" section. I'm new to this whole process so i'm sure i'm missing something somewhere or going about this incorrectly. Can anyone point me in the right direction please?


Solution

  • Are the instances of the object in the ArrayList all the same type? If so, then you might want to expose an IEnumerable<T> (where T is of that type) and then regenerate whatever proxies you are using on Android. This will probably give you a strongly-typed list which you can then consume more easily.