users@jax-rpc.java.net

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 .

ThanX
Dee Di



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


Is it legal to serialize and deserialize interfaces?

ie.
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;
       }
}

etc...

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?

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