I recently update my version of b4J, this code is not working. but was working in the old release.
I try it on a debian server with iptraf and never try to connect to host.
Victor
B4X:
Dim data As String = $"<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Login xmlns="http://tempuri.org/">
<username>${username}</username>
<password>${password}</password>
<accountId>${userid}</accountId>
</Login>
</soap:Body>
</soap:Envelope>"$
Sub connect_u(data As String)
Dim j As HttpJob
Try
Log(data)
j.Initialize("", Me)
If j.IsInitialized = True Then
Log("ok")
j.PostString("http://1.1.1.1:9191/Service.asmx",data)
j.GetRequest.SetHeader("SOAPAction","http://tempuri.org/Login")
j.GetRequest.SetContentType("text/xml; charset=utf-8")
End If
Catch
Log(LastException)
End Try
Wait For (j) jobDone(j As HttpJob)
If j.Success Then
Log(j.GetString)
End If
j.Release
End Sub
I try it on a debian server with iptraf and never try to connect to host.
Victor