You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Koney, Satish" <Sa...@syntelinc.com> on 2004/11/09 11:57:10 UTC

WSDL2Java server side classes

Hello All,

Why does Axis produce 5 classes when WSDL2Java invoked with -s option?
I mean if I want to make my class Dummy as web service, from WSDL file, it
generates 
the following files along with deploy.wsdd and undeploy.wsdd files

1. Dummy.java
2. DummyService.java
3. DummyServiceLocator.java
4. DummySoapBindingStub.java
5. DummySoapBindingImpl.java

But after deploying the service, when the client invokes the service, only
the follwoing 2 classes
are needed on the server.

1. DummyService.java
2. DummySoapBindingImpl.java

Then why does Axis generate the other 3 files?

Thanks,
SSSS.






____________________________________________
Confidential:  This electronic message and all contents contain information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.

Re: WSDL2Java server side classes

Posted by to...@gsk.com.
The WSDL2Java tool always generates classes that can be used on the 
client, regardless of whether or not you specify the -s option. Classes 
that it generates for the defined types can be used on the server or 
client. The locator and stub can be used on the client. I don't think 
there is a way to stop it generating the client side classes, but you can 
always ignore them.
Tony


Hello All,

Why does Axis produce 5 classes when WSDL2Java invoked with -s option?
I mean if I want to make my class Dummy as web service, from WSDL file, it
generates 
the following files along with deploy.wsdd and undeploy.wsdd files

1. Dummy.java
2. DummyService.java
3. DummyServiceLocator.java
4. DummySoapBindingStub.java
5. DummySoapBindingImpl.java

But after deploying the service, when the client invokes the service, only
the follwoing 2 classes
are needed on the server.

1. DummyService.java
2. DummySoapBindingImpl.java

Then why does Axis generate the other 3 files?

Thanks,
SSSS.






____________________________________________
Confidential:  This electronic message and all contents contain 
information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.



Re: WSDL2Java server side classes

Posted by Dan Ciarniello <dc...@cityxpress.com>.
Kim Tan wrote:

> Anyway, basically you have 2 intereface classes, both needed on the 
> client side, hence together with the actual implementation, you need 
> the 4 classes on the client side.
> on the server side, you need 2, one interface, and one the actual 
> implementation.
> if you are not implementing the client side, you can throw away the 
> other 3 classes.
>
Rather than "throwing away" code, I would prefer to be able to tell 
WSDL2Java to not generate the client-side code if it's not required.

Dan.


Re: WSDL2Java server side classes

Posted by Kim Tan <kk...@yahoo.com>.
your client side will need 4 files, 2 are intereface and 2 are the classes that actually implement the interface, from the names of the files, I will think they are as followed :
 
1. Dummy.java -- your service interface
2. DummyService.java -- locator interface
3. DummyServiceLocator.java  --- implements the Dummy.java interface
4. DummySoapBindingStub.java -- the stub that implement your service interface
 
 5. DummySoapBindingImpl.java - this is  your server side class, it implements Dummy.java interface (or the DummyService interface, or the Dummy.java, checck ).
 
I might be wrong on the 1 and 2 (they might be reverse), don't really remember how the naming convention is, depending on your wsdl. 
Anyway, basically you have 2 intereface classes, both needed on the client side, hence together with the actual implementation, you need the 4 classes on the client side.
on the server side, you need 2, one interface, and one the actual implementation.
if you are not implementing the client side, you can throw away the other 3 classes.


"Koney, Satish" <Sa...@syntelinc.com> wrote:
Hello All,

Why does Axis produce 5 classes when WSDL2Java invoked with -s option?
I mean if I want to make my class Dummy as web service, from WSDL file, it
generates 
the following files along with deploy.wsdd and undeploy.wsdd files

1. Dummy.java
2. DummyService.java
3. DummyServiceLocator.java
4. DummySoapBindingStub.java
5. DummySoapBindingImpl.java

But after deploying the service, when the client invokes the service, only
the follwoing 2 classes
are needed on the server.

1. DummyService.java
2. DummySoapBindingImpl.java

Then why does Axis generate the other 3 files?

Thanks,
SSSS.






____________________________________________
Confidential: This electronic message and all contents contain information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited. If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.

			
---------------------------------
Do you Yahoo!?
 Check out the new Yahoo! Front Page. www.yahoo.com