Android Question Send a list to a web service

DanteS

Member
Licensed User
Longtime User
Can I send a list to a web service using Poststring?
Something like
job1.PostString(wsLink, Mylist)
I am trying to insert a group of records into the database, in only one transaction
 

derez

Expert
Licensed User
Longtime User
Try converting the list to bytes array with something similar to this, using byteconverter:
data = bc.IntsToBytes(Array As Int(list.Size))
(depends on the type of values)
Then use job.postbytes
This is ok if you know the size of each item in the receiving side, to reconstruct the data.

alternatively you can add all the list to one string (like comma separated) and send it by poststring.
 
Last edited:
Upvote 0

DanteS

Member
Licensed User
Longtime User
Try converting the list to bytes array with something similar to this, using byteconverter:
data = bc.IntsToBytes(Array As Int(list.Size))
(depends on the type of values)
Then use job.postbytes
This is ok if you know the size of each item in the receiving side, to reconstruct the data.

alternatively you can add all the list to one string (like comma separated) and send it by poststring.


No, the data is going to be of any type and any size
I will continue using the big string solution.
These are not good news, but thanks a lot for answering
 
Upvote 0
Top