users@jax-rpc.java.net

Re: serialize and deserialize interfaces/abstract classes

From: Baltz, Kenneth <Kbaltz_at_FIRSTAM.COM>
Date: Tue, 22 Oct 2002 14:07:16 -0700

If I'm running wscompile using a <service>, not a <wsdl>, do I need to run
it again after running wsdeploy? It sounds like the model file does the
same thing for wsdeploy that <additionalTypes> does for wscompile.

K.C.

-----Original Message-----
From: Doug Kohlert [mailto:doug.kohlert_at_SUN.COM]
Sent: Tuesday, October 22, 2002 12:39 PM
To: JAXRPC-INTEREST_at_JAVA.SUN.COM
Subject: Re: serialize and deserialize interfaces/abstract classes


K.C.
If you wish to specify additionalTypes you must create a model file with
  wscompile and then pass this model to wsdeploy. This will let you
create the server side artifacts.

To create the client side artifacts you will run wscompile again against
the WSDL created above, this time however, you should specify the
"searchschema" feature. This will cause wscompile to create Java types
and serializers for all the types specified in the WSDL, not just those
that are actually used in the services specified by the WSDL.



Baltz, Kenneth wrote:
> > If you wish to use wsdeploy you will need to use the -model option on
> > wscompile to create a model. Then in the jaxrpc-ri.xml file in the war
> > file that you pass to wsdeploy, make sure to specify the model file.
> >
>
>
> In the standard JAX-RPC examples, wsdeploy gets run before wscompile.
> Are you suggesting the reverse? I having been wondering what how to get
> wsdeploy to handle additionalTypes in the way wscompile does. Is that
> through use of the model?
>
> K.C.
>
> >
>
> <endpoint
> name="InterfaceTest"
> displayName="Interface Test"
> description="Test for Interfaces"
> interface="stub_tie_generator_test.Inteface"
> implementation="stub_tie_generator_test.IntefaceImpl"
> model="/WEB-INF/interface.xml"/>
>
>
> John L. Fjellstad wrote:
> > 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
>
>
> --
> Doug Kohlert
> Java Software Division
> Sun Microsystems, Inc.
> phone: 503 345-9806
>


--
Doug Kohlert
Java Software Division
Sun Microsystems, Inc.
phone: 503 345-9806