#Region Project Attributes
#ApplicationLabel: TRails Portugal
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: True
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private xui As XUI
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Check("John", "11111")
'StartActivity("Index")
End Sub
Sub Check(username As String, password As String)
Dim XML As String
' XML=""
' XML = XML & "<?xml version='1.0' encoding='utf-8'?>"
' XML = XML & "<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'>"
' XML = XML & "<soap:Body>"
' XML = XML & "<CheckUser xmlns='http://75.119.136.162/WebServiceGeral/WebServiceGeral.asmx'>"
' XML = XML & "<username>"& username &"</username>"
' XML = XML & "<password>"& password &"</password>"
' XML = XML & "</CheckUser>"
' XML = XML & "</soap:Body>"
' XML = XML & "</soap:Envelope>"
XML = $"<?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>
<CheckUser xmlns="http://75.119.136.162/WebServiceGeral/WebServiceGeral.asmx">
<username>${username}</username>
<password>${password}</password>
</CheckUser>
</soap:Body>
</soap:Envelope>"$
Dim ResultURL As String
Dim j As HttpJob
j.Initialize("",Me)
'j.PostString("http://XX.XXX.XXX.XXX/WebServiceGeral/WebServiceGeral.asmx",XML)
'j.GetRequest.SetContentType("text/xml; charset=utf-8")
'j.GetRequest.SetHeader("SOAPAction","'http://XX.XXX.XXX.XXX/WebServiceGeral/WebServiceGeral.asmx/CheckUser'")
j.PostString("http://75.119.136.162/WebServiceGeral/WebServiceGeral.asmx", XML)
j.GetRequest.SetContentType("text/xml; charset=utf-8")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
ResultURL = j.GetString
Log(ResultURL)
StartActivity(Index)
Else
'ResultURL = j.ErrorMessage
Log(j.ErrorMessage)
End If
j.Release
End Sub