Hello,
I've got a Java hessian server with the following classes:
- abstract class A
--- class B extends A
--- class C extends A
and a method with the following signature:
public A myMethod();
Now, I've got the same class structure on the C# side (with the abstraction of A).
There is an exception when I try to call myMethod().
A possible fix that I found is to do :
return hessianInput.ReadReply(null); // methodInfo.ReturnType
Instead of:
return hessianInput.ReadReply(methodInfo.ReturnType);
In the file CHessianMethodCaller.cs (line 217 in release 1.3) , in the method DoHessianMethodCall()
So that it doesn't "force" the use of the class A (which is abstract and therefore which cannot be used).
There might be better fixes alought.
Regards,
Dinesh Bolkensteyn
Logged In: NO
Ok I suggest the following :
return hessianInput.ReadReply(null) as methodInfo.ReturnType;
(not tested)
But it should solve this issue while still providing a type-check.
Moreover, I did not understand why the content-type was set to "text/xml" while the data sent is actually binary. I'd suggest "application/octet-stream" for instance.
Best regards,
Dinesh Bolkensteyn (dinesh @ dinsoft . net)
Logged In: NO
okay that actually doesn't work because of compile-time/run-time issues.
+ It should throw a meaningful exception
Dinesh