Re: serialize and deserialize interfaces/abstract classes

From: Deepth Dinesan- CTD, Chennai. <deepthd_at_CTD.HCLTECH.COM>
Date: Tue, 22 Oct 2002 10:52:34 +0530

Must Be Cos the WSDL allows you to declare ComplexTypes with abstract=true .
I dunno about JAX-RPC but have used a commercial product named GLUE from
MindElectric which
which helped me to serialize/deserilize Abstract types. I think Systinet
wasp also allows this feature .

Dee Di

-----Original Message-----
From: John L. Fjellstad [mailto:john_at_PRODEXNET.COM]
Sent: Tuesday, October 22, 2002 10:06 AM
Subject: serialize and deserialize interfaces/abstract classes

Is it legal to serialize and deserialize interfaces?

My class look like this:
public interface Foo
     public int getIntType();
     public String getStringType();

public class IntFoo implements Foo
     public int getIntType() { return 1; }
     public String getStringType() { return null; }

now endpoint would be something like:
public Bar
      private Foo f;
      public void setFoo( Foo f )
            this.f = f;


Basically, Foo is an interface/abstract class. It looks like on the
server side, the deserialization doesn't realize it has to use the
subclasses... Any ideas?

John L. Fjellstad,  Software Engineer
ProdEx Technologies
14471 Big Basin Way, Suite E
Saratoga, CA 95070
Phone: (408) 872-3100