With simple code shown below I received via Web Services result as you can see in attach file. I don't understand how to read structure/result in this case.
Thanks!
P.S. I don't know if it's a good approach but if I use...
return is string not xml (
) as shown in second attach.
Thanks!
P.S. I don't know if it's a good approach but if I use...
B4X:
Return ds.GetXml
B4X:
Public Function fn(PublicKey As String) As String
B4X:
<WebMethod()>
<ScriptMethod(UseHttpGet:=True)> _
Public Function fn(PublicKey As String) As DataTable
Dim parts As String() = PublicKey.Split(New Char() {"~"c})
Dim connStringOAA As String
connStringOAA = "xxx"
Dim command As SqlCommand
Dim conn As New SqlConnection(connStringOAA)
Dim da As SqlDataAdapter = Nothing
Dim ds As DataSet = Nothing
conn.Open()
Try
command = New SqlCommand("fn", conn)
command.CommandType = CommandType.StoredProcedure
command.Parameters.AddWithValue("@Device_ID", parts(0))
da = New SqlDataAdapter(command)
ds = New DataSet("fn")
da.Fill(ds)
Catch ex As Exception
Finally
command = Nothing
conn.Close()
End Try
Dim dt As DataTable = ds.Tables(0)
Return dt
End Function