Hi. Thats the thing that bothers me. It appears that the version 2 specifications are not properly implemented for Java. Reading the source code of Java Hessian 3.1.1, its default implementation version of the HessianProxyFactory is at version 1. To instruct the HessianProxyFactory to use the version 2 specifications, you have to declare it on the factory by calling the methods setHessian2Request(boolean) and setHessian2Reply(boolean) with the argument set to true. Heres my code using the HessianProxyFactory:
START OF CODE HessianProxyFactory factory = new HessianProxyFactory(); factory.setHessian2Request(false); factory.setHessian2Reply(false); Service basic = (Service) factory.create(Service.class, "http://localhost:8080/hessian-test/hello2"); basic.getMessage(null); // should throw a NullPointerException because of a null argument END OF CODE I always get the IOExceptionWrapper: java.lang.UnsupportedOperationExceptionwhen I set either or both methods setHessian2Request(boolean) and setHessian2Reply(boolean) to true. I get the expected exception ( java.lang.NullPointerException) when i set both methods to false. Please do correct me if im wrong. - ian On 7/18/07, Ben Hood <[EMAIL PROTECTED]> wrote:
Ian > HessianProxyFactory. My reason for doing this is to have more control over > the Url Connection object. Anyways, an exception Encountered an > IOExceptionWrapper: java.lang.UnsupportedOperationException > was thown whenever an exception has been thrown by the service class. The > fix was to use the older version HessianOutput instead of Hessian2Output to > encode the request that i have created. Does the service you are speaking to use the 2.0 version of the Hessian protocol?
_______________________________________________ hessian-interest mailing list [email protected] http://maillist.caucho.com/mailman/listinfo/hessian-interest
