Mantis - Hessian
Viewing Issue Advanced Details
3036 major always 11-03-08 07:16 06-02-09 14:51
skipper13  
ferg  
normal  
closed 3.2.0  
fixed  
none    
none 4.0.1  
0003036: version detecting don't work
I try test examples "hessia-add" and "hessian-service" from resin-doc. For it I use hessian-3.2.0.jar.

I receive exception Exception in thread "main" com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: expected hessian reply at 0x48 (H).

If I set both setHessian2Reply and setHessian2Request to false test OK.
import java.net.MalformedURLException;
import com.caucho.hessian.client.HessianProxyFactory;

public class Demo {

    public static void main(String[] args) throws MalformedURLException {
    HessianProxyFactory factory;
    MathService math;
    
    factory = new HessianProxyFactory();
    factory.setDebug(true);
    /*
     * if set to false - test OK.
     * if both comment or only one set ro false - test fail.
     */
    factory.setHessian2Reply(false);
    factory.setHessian2Request(false);
    math = (MathService) factory.create(MathService.class, args[0]);

    System.out.println(args[0]);
    System.out.println("193 + 255: " + math.add(193, 255));
    System.out.println("13 - 1231: " + math.sub(13, 1231));
    System.out.println("1776 * 23: " + math.mul(1776, 23));
    System.out.println("34 / 11: " + math.div(34, 11));
    }

}

arg:
http://localhost:8080/resin-doc/examples/hessian-add/hessian/math [^]
http://localhost:8080/resin-doc/examples/hessian-service/math [^]

Notes
(0004051)
ferg   
06-02-09 14:51   
hessian/349-