• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Web Services in android

Soulforth

Lurker
Hey guys,

I am currently working with an app that comunicates with web services, but unfornately android only recognizes a few types as primitive, and so the type UUID and double aren't serializable, i know that marshalling works, but i can't seem to use it. If you can help me use marshalling or tell me another way to do it i would be grateful.

the serialization errors are:

W/System.err(327): java.lang.RuntimeException: Cannot serialize: 3e1c7765-7370-4295-8170-92a1d2dc542c-userId


java.lang.RuntimeException: Cannot serialize: 7573dcd3-e5eb-4847-8d6c-d7d171a932d7-WeightId

double: java.lang.RuntimeException: Cannot serialize: 85.0-UserWeight
 
How is your webservice structured. I can say for REST API (GET) you do not need to serialize as the string would be considered and translated as literal (unless there are funny characters).

That said, if you want to encode take a look at URLEncoder | Android Developers

Alternative options are serialization by hand using Externalizable/Serialize.

hopefully this helps.
 
How is your webservice structured. I can say for REST API (GET) you do not need to serialize as the string would be considered and translated as literal (unless there are funny characters).

That said, if you want to encode take a look at URLEncoder | Android Developers

Alternative options are serialization by hand using Externalizable/Serialize.

hopefully this helps.
The web service is a soap web service. So i don't know how that would work on ksoap2.
 
Back
Top Bottom