Android Question How to pass Array Set to Webservice At Once

Richard Goh

Active Member
Licensed User
Longtime User
I had a list of records to be passed to C# WebService. So far I managed to pass normal string to the webservice. But how can I pass the value in a list to the Webservice? One of the parameters in my Webservice is a String[] type. Which had 2 columns in it [Col1, Col2] for each row. How can I do it?
I came across the "TYPE" structure. Can it be used to pass as 1 of the String[] to Webservice?
 

Richard Goh

Active Member
Licensed User
Longtime User
The question is what should the generated XML string should look like?

Do you have any example?

here's my sample webservice xml code. The String[] in webservice is transformed into transDetails section in the xml.

B4X:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Upload xmlns="http://www.tempuri.org/">
      <AccountId>string</AccountId>
      <remarks>string</remarks>
      <transDetails>
        <string>string</string>
        <string>string</string>
      </transDetails>
    </Upload>
  </soap12:Body>
</soap12:Envelope>
 
Upvote 0
Top