Android Question Send a list to a web service

Discussion in 'Android Questions' started by DanteS, Feb 10, 2015.

  1. DanteS

    DanteS Member Licensed 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
  2. derez

    derez Expert Licensed 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: Feb 10, 2015
  3. DanteS

    DanteS Member Licensed User

    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
  4. Erel

    Erel Administrator Staff Member Licensed User

    It depends on your server. What does your server expect?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice