users@jax-rpc.java.net

Re: A Simple doubt for usage in TYPES in JAX-RPC

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Mon, 12 Jul 2004 17:31:53 -0700

Shaba,
The actual object that you pass to the client will not be passed to the
server. It will be serialized as xml and then a new
Address object on the server will be created with the property values
serialized from the client. Basically,
write your service endpoint interface. Generate and deploy the
service. Generate the stub and client side artifacts.
Use the generated service endpoint interface and Java classes on the
client to write the client and all should work for you.


shaba dil wrote:

> Dear Bobby,
>
> >Shaba,
> >When you genereate your webservice, a
> >schema type should get defined in the generated wsdl.
> >When the client is generated from this wsdl a Address JavaBean class
> >will also be generated. Of course, this Address class on the client
> >will not be the same as the one on the server but it will have the same
> >properties.
>
> Can i use the same object as parameter for calling server method that is,
>
> setAddress(Address address)
>
> do i encounter a ClassCastException?coz both are different types in
> server.
>
> Thanks,
> Shaba
>
> Doug Kohlert <Doug.Kohlert_at_Sun.COM> wrote:
>
> Shaba,
> When you genereate your webservice, a
> schema type should get defined in the generated wsdl.
> When the client is generated from this wsdl a Address JavaBean class
> will also be generated. Of course, this Address class on the client
> will not be the same as the one on the server but it will have the
> same
> properties.
>
> shaba dil wrote:
>
> > Hi all,
> >
> > I have'nt recovered from my installation problom of JAX-RPC
> yet.But i
> > am having a simple doubt on using CUSTOM datatype with JAX-RPC.
> >
> > Suppose,
> >
> > I am having a class Address( a javabean) in server.
> >
> > So in Service endpoint interface,i am having methods,
> >
> > public Address[] getAllAddresses()
> > public void setAddress(Address address);
> >
> > So in client i get Address Type! from Stub.and through stub, i get
> > server data.that is address[] which was previousely stored.
> >
> > OK..then problom,
> >
> > In client,i use a Swing GUI to collect data from user.Which is
> having
> > a form to collect the details of Address.
> >
> > After getting the enough data from User interface form,i have
> enough
> > data to create an Object to Address class.
> >
> > But in client there was No Address class.Address class is in
> > server.And client run in seperate JVM.
> >
> > So how to resolve this situation?
> >
> > 1) May i create an Address class same as server in client side and
> > create an object for it?.
> > 2) Or Can i create Address object without having an Address
> class in
> > client?.
> >
> > Thanks,
> > Shaba
> >
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> > Do you Yahoo!?> Yahoo! Mail
> >
> > - Helps protect you from nasty viruses.
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Doug Kohlert
>
> Sun Microsystems, Inc.
> doug.kohlert_at_sun.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail
> <http://us.rd.yahoo.com/mail_us/taglines/100/*http://promotions.yahoo.com/new_mail/static/efficiency.html>
> - 100MB free storage!


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Doug Kohlert
Sun Microsystems, Inc.            
doug.kohlert_at_sun.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net