Hi there
I have been banging my head on the wall trying to debug my code without success!
I get the following error when I compile my code:
** Activity (main) Resume **
*** Receiver (httputils2service) Receive (first time) ***
ResponseError. Reason: Bad Request, Response: Bad Request
JobName = , Success = false
Error occurred on line: 301 (HttpJob)
java.io.FileNotFoundException: /data/user/0/b4a.example/cache/1: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:575)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:215)
at b4a.example.httpjob._getstring2(httpjob.java:483)
at b4a.example.httpjob._getstring(httpjob.java:123)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7891)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1062)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
And heres my code:
I don't know what file is not being found, according to the error message...
Please assist...
I have been banging my head on the wall trying to debug my code without success!
I get the following error when I compile my code:
** Activity (main) Resume **
*** Receiver (httputils2service) Receive (first time) ***
ResponseError. Reason: Bad Request, Response: Bad Request
JobName = , Success = false
Error occurred on line: 301 (HttpJob)
java.io.FileNotFoundException: /data/user/0/b4a.example/cache/1: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:575)
at java.io.FileInputStream.<init>(FileInputStream.java:160)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:215)
at b4a.example.httpjob._getstring2(httpjob.java:483)
at b4a.example.httpjob._getstring(httpjob.java:123)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA$2.run(BA.java:395)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7891)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:568)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1062)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
And heres my code:
B4X:
Dim XML_String 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>
<Insert_SmartForceData xmlns="http://tempuri.org/">
<NOTICE_NO>123456</NOTICE_NO>
<DOCUMENT_NO>123456</DOCUMENT_NO>
<LACODE>123456</LACODE>
<NOTICE_STATUS>123456</NOTICE_STATUS>
<NOTICE_STAGE>123456</NOTICE_STAGE>
<NOTICE_TYPE>123456</NOTICE_TYPE>
<INITIALS>123456</INITIALS>
<FIRST_NAMES>123456</FIRST_NAMES>
<SURNAME>123456</SURNAME>
<GENDER>123456</GENDER>
<ID_NO>123456</ID_NO>
<ID_TYPE_ID>123456</ID_TYPE_ID>
<LICENCE_CODE>123456</LICENCE_CODE>
<NATIONALITY>123456</NATIONALITY>
<OCCUPATION>123456</OCCUPATION>
<DOB>123456</DOB>
<AGE>123456</AGE>
<REGISTRATION_NO>123456</REGISTRATION_NO>
<VEHICLE_MAKE>123456</VEHICLE_MAKE>
<VEHICLE_TYPE>123456</VEHICLE_TYPE>
<VEHICLE_COLOR>123456</VEHICLE_COLOR>
<POSTAL_ADDRESS1>123456</POSTAL_ADDRESS1>
<POSTAL_ADDRESS2>123456</POSTAL_ADDRESS2>
<POSTAL_ADDRESS3>123456</POSTAL_ADDRESS3>
<POSTAL_CODE>123456</POSTAL_CODE>
<PHYSICAL_ADDRESS1>123456</PHYSICAL_ADDRESS1>
<PHYSICAL_ADDRESS2>123456</PHYSICAL_ADDRESS2>
<PHYSICAL_ADDRESS3>123456</PHYSICAL_ADDRESS3>
<PHYSICAL_POSTAL_CODE>123456</PHYSICAL_POSTAL_CODE>
<HOME_TEL>123456</HOME_TEL>
<CELL_MOBILE>123456</CELL_MOBILE>
<AMOUNT_1>123456</AMOUNT_1>
<AMOUNT_2>123456</AMOUNT_2>
<AMOUNT_3>123456</AMOUNT_3>
<CHARGE_CODE_1>123456</CHARGE_CODE_1>
<CHARGE_CODE_2>123456</CHARGE_CODE_2>
<CHARGE_CODE_3>123456</CHARGE_CODE_3>
<CHARGE_MAIN2>123456</CHARGE_MAIN2>
<CHARGE_MAIN3>123456</CHARGE_MAIN3>
<LOCATION_CODE>123456</LOCATION_CODE>
<OFFICER_NUMBER>123456</OFFICER_NUMBER>
<COURT_CODE>123456</COURT_CODE>
<COURT_ROOM>123456</COURT_ROOM>
<OFFENCE_TIME>123456</OFFENCE_TIME>
<OFFENCE_DATE>123456</OFFENCE_DATE>
<PAYMENT_DUE_DATE>123456</PAYMENT_DUE_DATE>
<COURT_DATE>123456</COURT_DATE>
<CAPTURED_DATE>123456</CAPTURED_DATE>
<CAPTURER>123456</CAPTURER>
<DEVICE_SERIAL_NO>123456</DEVICE_SERIAL_NO
</Insert_SmartForceData >
</soap:Body>
</soap:Envelope>"$
' Log("XML_String = " & XML_String)
Dim job As HttpJob
job.Initialize("",Me)
job.PostString("http://154.0.174.160:81/service1.asmx",XML_String)
job.GetRequest.SetHeader("SOAPAction", "http://tempuri.org/Insert_SmartForceData")
job.GetRequest.SetContentType("text/xml; charset=utf-8")
Wait For (job) JobDone(j As HttpJob)
If j.Success Then
Log("Result = " & job.GetString)
Else
Log("####### Failed")
Log(j.ErrorMessage)
End If
j.Release
I don't know what file is not being found, according to the error message...
Please assist...