Based on what you posted, you control both the server and the client, right?
If so, have you tried JSON? I've used it quite a bit for server <-> client and there are a lot of helpers for every language out there, including a native Android API. http://developer.android.com/reference/org/json/package-summary.html I personally haven't used .NET on these projects, but it's done well for both local and server storage of complex objects. A quick Google of ".net json" took me to http://json.codeplex.com/ . Again, I don't use .NET so I can't say anything for sure, but might be worth a look. Steven Studio LFP http://www.studio-lfp.com On Sep 28, 10:50 am, AgitoM <[email protected]> wrote: > Been at this problem the whole day, so hope someone can help. > For a project I am working on, I need to invoke a .NET based web > service. Several operations of this web service return complex types > or arrays of complex types. In some cases the complex objects contain > arrays of other complex objects until sometimes 3 levels deep. > > To make the handling of the objects easier by the Android developers, > I would prefer them to have the actual object structure available upon > the return of the result so they can easily parse through it. So far > I've attempted to accomplish this using kSoap > > I've tried all sorts of things to make this possible. > 1. Generate the Web Service Client classes in Netbeans > - The generated stub requires J2ME libraries > - The kSoap SoapEnvelope Response Object can't cast to the generated > classes by Netbeans. > > 2. Tried using AXIS2 generated classes and stubs. > - AXIS2 invocation code won't execute properly > > Need a solution to handle these complex data structures without having > to write elaborate conversion code. Anybody got any suggestion or > solution? > > Here is some of the code I tried: > > AXIS2: > > try { > WSStub stub = new WSStub(); > > WSStub.GetZonesWithLocations req = new > WSStub.GetZonesWithLocations(); > GetZonesWithLocationsResponse > resp = stub.getZonesWithLocations(req); > > ZonesWithLocations[] zones = > resp.getGetZonesWithLocationsResult(); > System.out.println("Zone Name " + zones[0].getZoneName()); > } > catch(Exception e) { > e.printStackTrace(); > } > > Using the Netbeans generated classes: > // Formulate Soap Request > SoapObject request = new SoapObject(NAMESPACE2, METHOD_NAME2); > > // Create Soap Envelope > SoapSerializationEnvelope envelope = new > SoapSerializationEnvelope( > SoapEnvelope.VER11); > envelope.dotNet = true; > envelope.setOutputSoapObject(request); > > AndroidHttpTransport androidHttpTransport = new > AndroidHttpTransport(URL2); > > try { > androidHttpTransport.call(SOAP_ACTION2, envelope); > ZonesWithLocations[] response = ( > ZonesWithLocations[]) > envelope.bodyIn; > > System.out.println("Response: " + > response[0]..getZoneName()); > } catch (Exception ex) { > ex.printStackTrace(); > } > > Hope anybody can help, a lot depends on getting this to work. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

