blankey0206 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

handling of getPropertyCount get's wrong on classes for send AND receive #195

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make a simple String Vector class for KvmSerializable
2. use this.size() for getPropertyCount as it indicates the size of the Vector
3. call the service, the Vector is fully send
4. parsing fails with "Unknown Property" when receiving the String Vector

5. switch getPropertyCount to return a static 1
6. call the service, only the first entry of the Vector is send
7. parsing successful when receiving the String Vector

What is the expected output? What do you see instead?
Sending of all members from the Vector.
Successful parsing on receiving the Vector.

What version of the product are you using? On what operating system?
3.3.0
linux arch
android api 19

Please provide any additional information below.
workaround:
    public int getPropertyCount() {
        return this.size() > 0 ? this.size() : 1;
    }

Original issue reported on code.google.com by post6...@gmail.com on 14 Aug 2014 at 5:19