enter code hereI have a basic question regarding an implementation using a Axis2 web service and Android KSOAP2 client.
I have an API of the server that gets unviewed entries from a table Table: key,cul1..culn, culViewes - bit if was viewed or not.
I implemented the GetUnViewedAPI as followed (in the service):
public int[] getUnviewed()
{
... getting all unviewed ids...
... marking them as viewed...
... return the unviewed ids..
}
What if connection is lost in the middle (with the mobile client)? Then the unviewed entries will not be viewed...since were marked as viewed but result did not get to the user.
Should user send ACK for each of the ids (or ack on all togather...)? Or... ???? How it is usually handled?
Yoav
I would split this up. First you get all the unviewed ones to the user. Then the user has to actively e.g. do a select all and pressed a viewed button or so and then you push back to the server what was viewed and mark it as such.
If you do it all automatically you have no idea if the users actually ever saw it or received it for that matter. Theoretically Soap has transaction support as part of one of the ws* standards but I doubt that would be useful in your use case. I also dont think ksoap2 android supports them (and I am the project owner..)