Hi Bobby,
I got ur point.but my questien is little more deep.
Suppose,
i am having 2 packages.
1)server
2)client
In server i am having class Address.which is server.Address.
In client i am having class Address.which is client.Address.Both classes are very similer.just copied and pasted in two directories and just changed the decleration of package name.
What i am asking is,My client will have a GUI for collecting data.And after collecting data,i can only make an object for class client.Address.I cant make an object for server.Address.Becoz i only having a client.Address template in client side.Even though two classes are similer,they are incompatile types in the view of JVM.
that is,
client.Address != server.Address.
so while making schema,the wscompile will ignore the package deceration?.or wscompile will make Address object in server according to server.Address?.How it be?.If schema will be parsed to only server.Address type only becoz of name,how can anyone use classes with same name?.
That is,
Suppose,
I am having 2 subpackages in server package
1) firstpackage
2) secondpackage
and each directory having class named,
1) firstpackage.Address in firstpackage
2) secondpackage.Address in secondpackage
Suppose both classes are different Address classes for clarity.
when sending Address schema from client to server,and building classes from server according to schema,which class the server will make?.
firstpackage.Address OR secondpackage.Address?..becoz server having 2 options there.
I am thinking about redisigning my system with HashMap or HashTable class.so it'll not have Type probloms.
But using Types will be little more easier.One step of coding(making server.Address class from HashMap) can be saved.
Plz let me clarify this doubt.
Thanks,
Shaba
Doug Kohlert <Doug.Kohlert_at_Sun.COM> wrote:
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 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
>
> - 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
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!