I'm using a hessdroid proxy to communicate between my android application and my webservice/hessianservlet. It works immediatly after starting the app, but when I wait a minute and let the app call a network function again (e.g. logout()) I get this error message:
com.caucho.hessian.client.HessianConnectionException: 500: java.io.EOFException
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:197)
at $Proxy1.getPassword(Native Method)
at tsch.serviceApp.net.DataHandler.getPassword(DataHandler.java:50)
at tsch.serviceApp.PageSystemApps$1$1.run(PageSystemApps.java:91)
Caused by: java.io.EOFException
at libcore.io.Streams.readAsciiLine(Streams.java:203)
at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:573)
at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:821)
at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:283)
at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:495)
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:167)
.
public String login() {
HessianProxyFactory factory = new HessianProxyFactory();
String url = "http://192.168.56.1:8080/hessianServer";
factory.setHessian2Reply(false); // avoid hessian reply error
try {
userCon = (IUserService) factory.create(IUserService.class, url+"/IUserService");
} catch (MalformedURLException e) {
e.printStackTrace();
}
return "Logged in!";
}
public void logout() {
userCon.logout();
}
Used Flamingo instead of Hessdroid and everything works fine!