I'm trying to send object as parameter to web service on java. It always throws a Runtime exception with Cannot serialize what is the best way to do that thx in advance
Like as Ksoap2's page in google code, CodingTipsAndTricks part: To get this xml:
<users>
<user>
<name>Jonh</name>
<age>12</age>
</user>
<user>
<name>Marie</name>
<age>27</age>
</user>
</users>
You would do this:
SoapObject users = new SoapObject(NAMESPACE, "users");
SoapObject john = new SoapObject(NAMESPACE, "user");
john.addProperty("name", "john");
john.addProperty("age", 12);
SoapObject marie = new SoapObject(NAMESPACE, "user");
john.addProperty("name", "marie");
john.addProperty("age", 27);
users.addSoapObject(john);
users.addSoapObject(marie);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.