MoscovoPT
Member
Boa tarde.
Gostaria de uma ajuda, se possível.
Segui o tutorial de webservices mas não me consigo ligar através do mesmo. Ocorre o erro em baixo.
Também adicionei HU2_ACCEPTALL aos Conditional Symbols em Build Configurations para aceitar todas as ligações mas não resolveu o problema.
Erro:
ResponseError. Reason: java.net.ConnectException: Failed to connect to /XX.XXX.XXX.XXX:80, Response:
Muito obrigado.
Gostaria de uma ajuda, se possível.
Segui o tutorial de webservices mas não me consigo ligar através do mesmo. Ocorre o erro em baixo.
Também adicionei HU2_ACCEPTALL aos Conditional Symbols em Build Configurations para aceitar todas as ligações mas não resolveu o problema.
Erro:
ResponseError. Reason: java.net.ConnectException: Failed to connect to /XX.XXX.XXX.XXX:80, Response:
Muito obrigado.
Webservice Login:
#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>"
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'")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
ResultURL = j.GetString
Else
ResultURL = j.ErrorMessage
End If
j.Release
End Sub