users@jax-rpc.java.net

Re: serialize and deserialize interfaces/abstract classes

From: John L. Fjellstad <john_at_PRODEXNET.COM>
Date: Tue, 22 Oct 2002 16:28:27 -0700

Hi Doug,

Doug Kohlert wrote:
> John, yes you can serialize and deserialize interface/abstract classes
> with the JAXRPC ri. To do so however, requires that you specify in the
> wscompile config file all of the subclasses that will be used at
> run-time. You do this by adding <additionaType> elements. Here is an
> example.

I already do that. I also use the following arguments in my wscompile
arg list: -classpath ${classpath}, -gen:both -d ${classes} config.xml

config.xml has the additionalType elements.

When wscompile tries to create the stubs, I get the following error message:
error: invalid type for JAX-RPC structure: test.Foo

where test.Foo is the interface

Basically, Foo seems to an invalid JAX-RPC type because it's an
interface. If I change Foo to not be an interface (by introducing a
member variable), the same stub creation works fine (also,
serializes/deserializes correct subclasses)

I tried using xrpcc too, and got the same results.

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