Hi
I have had some great success with HttpUtils using it to log onto a secure company site but the site has moved on to a Microsoft log-in server and this has caused a problem, I have updated the PostUrl and The PostData but I get an "org.apache.http.client.ClientProtocolException". I have updated my VB.net version of the program with the same data and it logs on correctly.
Below is some of the unfiltered log output with the exception, if anybody has any idea with what is going on.
Edward
I have had some great success with HttpUtils using it to log onto a secure company site but the site has moved on to a Microsoft log-in server and this has caused a problem, I have updated the PostUrl and The PostData but I get an "org.apache.http.client.ClientProtocolException". I have updated my VB.net version of the program with the same data and it logs on correctly.
Below is some of the unfiltered log output with the exception, if anybody has any idea with what is going on.
Edward
B4X:
Layer::requestBuffer(this=0x53f568), index=0, pid=8956, w=480, h=800 success
Starting Job: POST Job1
Layer::requestBuffer(this=0x53f568), index=1, pid=8956, w=480, h=800 success
** Service (httputilsservice) Create **
** Service (httputilsservice) Start **
Layer::setBuffers(this=0x685628), pid=8956, w=1, h=1
Layer::setBuffers(this=0x685628), pid=8956, w=1, h=1
Layer::requestBuffer(this=0x685628), index=0, pid=8956, w=358, h=85 success
GC_FOR_MALLOC freed 4067 objects / 251704 bytes in 45ms
Grow heap (frag case) to 3.111MB for 87396-byte allocation
GC_FOR_MALLOC freed 982 objects / 46376 bytes in 41ms
GC_FOR_MALLOC freed 845 objects / 63992 bytes in 33ms
Grow heap (frag case) to 3.297MB for 87396-byte allocation
GC_FOR_MALLOC freed 215 objects / 10312 bytes in 42ms
GC_FOR_MALLOC freed 0 objects / 0 bytes in 43ms
Grow heap (frag case) to 3.371MB for 87396-byte allocation
GC_FOR_MALLOC freed 1 objects / 24 bytes in 50ms
GC_EXPLICIT freed 75 objects / 3416 bytes in 57ms
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
at anywheresoftware.b4a.http.HttpClientWrapper$3.run(HttpClientWrapper.java:211)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1102)
Caused by: org.apache.http.client.CircularRedirectException: Circular redirect to 'https://portal.aerlingus.com/web/Login'
at org.apache.http.impl.client.DefaultRedirectHandler.getLocationURI(DefaultRedirectHandler.java:173)
at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:892)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:457)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
... 9 more
Error. Url=https://portal.aerlingus.com/CookieAuth.dll?Logon Message=org.apache.http.client.ClientProtocolException
Layer::setBuffers(this=0x6b34d8), pid=8956, w=1, h=1
Layer::setBuffers(this=0x6b34d8), pid=8956, w=1, h=1
Layer::requestBuffer(this=0x6b34d8), index=0, pid=8956, w=441, h=293 success
No longer want com.htc.bg (pid 2820): hidden #16
Adding Alarm{4694e5b8 type 2 com.google.android.apps.maps} Dec 14 06:09:38 a.m.
Layer::requestBuffer(this=0x6b34d8), index=1, pid=8956, w=441, h=293 success
Layer::requestBuffer(this=0x6b34d8), index=0, pid=8956, w=441, h=293 success
Layer::requestBuffer(this=0x6b34d8), index=1, pid=8956, w=441, h=293 success
notePhoneSignalStrengthLocked: 1->2
Adding Alarm{46660cc8 type 2 com.google.android.apps.maps} Dec 14 06:09:38 a.m.
weatherClock onReceive~ mUseAnimation:false
weatherClock onReceive~ mUseAnimation:false
notePhoneSignalStrengthLocked: 2->1
Adding Alarm{46624890 type 2 com.google.android.apps.maps} Dec 14 06:09:38 a.m.
** Service (httputilsservice) Destroy **
httputilsservice_processnexttask (B4A line: 51)
If HttpUtils.Working = False Then
java.lang.NullPointerException
at ed.smith.aims.httputilsservice._processnexttask(httputilsservice.java:249)
at ed.smith.aims.httputilsservice._hc_responseerror(httputilsservice.java:159)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x400259f8)
FATAL EXCEPTION: main
java.lang.RuntimeException: java.lang.NullPointerException
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:145)
at anywheresoftware.b4a.BA$1.run(BA.java:210)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at ed.smith.aims.httputilsservice._processnexttask(httputilsservice.java:249)
at ed.smith.aims.httputilsservice._hc_responseerror(httputilsservice.java:159)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
... 10 more
AndroidRuntime onExit calling exit(0)
Process ed.smith.aims (pid 8956) has died.
WIN DEATH: Window{4658db20 ed.smith.aims/ed.smith.aims.main paused=false}
WIN DEATH: Window{4659c340 ed.smith.aims/ed.smith.aims.main paused=false}
WIN DEATH: Window{466434b0 ed.smith.aims/ed.smith.aims.main paused=false}
fail to set top app changed!
close_akm, fd=120
Unexpected resume of com.htc.launcher while already resumed in ed.smith.aims
Layer::setBuffers(this=0xcf6f78), pid=204, w=480, h=800
Layer::setBuffers(this=0xcf6f78), pid=204, w=480, h=800
Layer::requestBuffer(this=0xcf6f78), index=0, pid=204, w=480, h=800 success
Layer::requestBuffer(this=0xcf6f78), index=1, pid=204, w=480, h=800 success
GC_EXPLICIT freed 46 objects / 2168 bytes in 348ms
Compass CLOSE
notePhoneSignalStrengthLocked: 1->2
Adding Alarm{4680f6c8 type 2 com.google.android.apps.maps} Dec 14 06:09:38 a.m.