Question

I am using Hessian Binary Protocol. It works fine when

CASE I:

  • Server
  • -- Java
  • Client
  • -- Java
  • -- PHP

CASE II:

  • Server
  • -- PHP
  • Client
  • -- PHP

But it throws exception

java.io.IOException: Server returned HTTP response code: 500 for URL

when

CASE III:

  • Server
  • -- PHP
  • Client
  • -- JAVA

I have googled a lot & found this https://code.google.com/p/hessianphp/issues/detail?id=20

Any help ?

Was it helpful?

Solution

Hessian uses v1 as default. It will give you error in the case you're using. However, HessianProxyFactory can be easily switched to v2 mode, like I demonstrate here in the following sample code:

HessianProxyFactory factory = new HessianProxyFactory();
factory.setHessian2Request(true);
// Do something 

Source: Hessdroid

Hope that will work for you!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top