Android Question Webservices and datatable

Luca Tonelli

Licensed User
I need to read the response of a webservices that provides data in a datatable The webservices is called correctly but
I do not know how to read the data contained in the datatable.


Well-Known Member
Licensed User
response is handled in
Sub JobDone (Job As String)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
    If Job.Success = True Then
                      dim response as string
                      response = job.getstring '<--- webservice response

End Sub

Luca Tonelli

Licensed User
Job.getstring () returns an xml string.
I would like to read the values of the individual rows by copying them into an array or a list.
I return this:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="" xmlns:xsd="" xmlns:xsi="">
      <LoginResponse xmlns="">
            <xs:schema xmlns:xs="" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
               <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Table" msdata:UseCurrentLocale="true">
                     <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="Table">
                                 <xs:element name="Id" type="xs:decimal" minOccurs="0" />
                                 <xs:element name="Abilitato" type="xs:boolean" minOccurs="0" />
                                 <xs:element name="Admin" type="xs:boolean" minOccurs="0" />
            <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
               <NewDataSet xmlns="">
                  <Table diffgr:id="Table1" msdata:rowOrder="0">

Luca Tonelli

Licensed User
Thanks for the reply
I looked at the Xml2Map class. with the code shown below :
        Dim xm As Xml2Map
         Dim root As Map=xm.Parse(job.GetString())
        Dim Envelope As Map=root.Get("Envelope")
        Dim Body As Map=Envelope.Get("Body")
        Dim LoginResponse As Map=Body.Get("LoginResponse")
        Dim LoginResult As Map=LoginResponse.Get("LoginResult")
        Dim diffgram As Map =LoginResult.Get("diffgram")
        Dim NewDataSet As Map =diffgram.Get("NewDataSet")
        Dim Table As Map =NewDataSet.Get("Table")
the map of the Table variable contains
(MyMap) {Attributes={id=Table1, rowOrder=0}, Id=1, Abilitato=true, Admin=true}
I do not know how to extract the second part of the data
Id=1, Abilitato=true, Admin=true