Donate Share

HessianCsharp

Tracker: Bugs

5 Abstract classes are not reconstructed properly - ID: 1962387
Last Update: Comment added ( nobody )

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


Nobody/Anonymous ( nobody ) - 2008-05-12 13:22

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )




Date: 2008-05-12 20:30
Sender: nobody

Logged In: NO

okay that actually doesn't work because of compile-time/run-time issues.

+ It should throw a meaningful exception

Dinesh


Date: 2008-05-12 18:18
Sender: nobody

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)


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.