Hi,when I connect web service has a error :unexpected end of stream on okhttp3.Address@c1d37c3f
how I can resolve thanks
how I can resolve thanks
B4X:
Sub zx1_scan_result (scantext As String, scanformat As String)
Log ("B4A scan text = " & scantext)
Log ("B4A scan format = " & scanformat)
b3_Click
Sleep(10)
Dim rtnmsg,epurl As String
Dim parm As String
Dim job1 As HttpJob
Dim str() As String
job1.Initialize("job1",Me)
epurl="http://zhzk.xipc.com.cn:8902/EIR.asmx"
parm="securityKey=D0EA5FC3BA214476A8288271A70291EF&CorpCode=913502007760244992&EIRNo="&scantext
Log(parm)
'job1.PostString(epurl&"/GetEirInfo",parm)
job1.PatchString(epurl&"/GetEirInfo",parm)
Wait For (job1) JobDone(job1 As HttpJob)
rtnmsg="请重试"
If job1.Success Then
rtnmsg=JobDone(job1)
Log(rtnmsg)
If rtnmsg.SubString2(0,2)="OK" Then
str=Regex.split("@",rtnmsg)
For i=1 To str.Length -1
Log(str(i))
Next
Else
Msgbox(rtnmsg,"提示")
End If
Else
Msgbox(rtnmsg,"提示")
End If
End Sub
Sub JobDone (Job As HttpJob) As String
Dim rtnmsg As String
Dim str() As String
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
rtnmsg=app_public.xml_parse(Job.GetString)
Log(rtnmsg)
str=Regex.split("@",rtnmsg)
Job.Release
Return rtnmsg
Else
'Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
Job.Release
Return "请重试"&Job.ErrorMessage
End If
End Sub