I am following the jRDC2 tutorial.
It is not going well.
The server's firewall is open (17178).
------
------
I have confirmed that the b4j server is running normally.
Below is the result of the server.
RemoteServer is running (06/14/2020 12:49:25)
Connection successful.
However, the desired result is not obtained in the b4a client.
Below is the b4a code.
Below is the error message.
I followed the tutorial perfectly but I am not sure where the problem is.
It is not going well.
The server's firewall is open (17178).
------
------
I have confirmed that the b4j server is running normally.
Below is the result of the server.
RemoteServer is running (06/14/2020 12:49:25)
Connection successful.
However, the desired result is not obtained in the b4a client.
Below is the b4a code.
b4a code:
Sub Process_Globals
Type DBResult(Tag As Object, Columns As Map , Rows As List)
Type DBCommand(Name As String , Parameters() As Object)
Private const rdcLinc As String = "http://192.168.0.5:17178/rdc"
End Sub
Sub CreateRequest As DBRequestManager
Dim req As DBRequestManager
req.Initialize(Me,rdcLinc)
Return req
End Sub
Sub CreateCommand(Name As String , Parameters() As Object ) As DBCommand
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = Name
If Parameters <> Null Then cmd.Parameters = Parameters
Return cmd
End Sub
Sub Activity_Create(FirstTime As Boolean)
GetRecord(2)
End Sub
Sub GetRecord(id As Int)
Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("select_employees",Array(id))
wait for (req.ExecuteQuery(cmd,0,Null)) jobdone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j,"req")
Wait For (req) req_result(res As DBResult)
req.PrintTable(res)
Else
Log("error : " & j.ErrorMessage)
End If
End Sub
Below is the error message.
b4a error message:
ResponseError.Reason: java.net.SocketTimeoutException: failed to connect to /192.168.0.5 (port 17178) after 30000ms, Response:error: java.net.SocketTimeoutException: failed to connect to /192.168.0.5 (port 17178) after 30000ms
I followed the tutorial perfectly but I am not sure where the problem is.