File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Webservice - WSDL or Java Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Webservice - WSDL or Java Class" Watch "Webservice - WSDL or Java Class" New topic

Webservice - WSDL or Java Class

Nageswar Kakolla
Ranch Hand

Joined: Jan 16, 2006
Posts: 71
Hi there,

I am using IBM RAD to generate Webservices. My dilemma is should I start with WSDL definition and generate Binding Classess or go ahead and start with Java Classes and expose them as Webservices by generating WSDL, Stub etc.

It seems either approach is Ok except that I am more comfortable with Java Code than WSDL nuances

ashwin tandel

Joined: Aug 18, 2003
Posts: 2
Java code to WSDL is nice approach.
In projects, we are likey to have a jave code which we need to expose as webservice
Peer Reynders

Joined: Aug 19, 2005
Posts: 2933
Originally posted by ashwin tandel:
Java code to WSDL is nice approach.

"Nice" until you run into some of the drawbacks.

Have you read this yet: Why Contract First?

See also
Starting Out
JAX-RPC to JAX-WS (Client impact)

Ultimately you have to ask yourself - are you designing a "Java" service or a SOAP web service (and implementing it in Java).
Nageswar Kakolla
Ranch Hand

Joined: Jan 16, 2006
Posts: 71
I am convinced with Contract First as opposed to Contract Last. Spring argument is very good one.
Binod Suman

Joined: May 07, 2008
Posts: 17
Hi Peer,

Thanks a lot.
I also had the same problem that how to start the webservice development work either from java class or from wsdl. But after read your given url (Chapter 2. Why Contract First?), now I am confirm that we should start from wsdl.

Thanks again.

Binod Suman
NarendraBabu Bandaru

Joined: May 17, 2008
Posts: 20
I also feel good to write the web services from CONTRACT as first and it is easy to specify the requiremnts directly into the XSD's.

abhishek paul

Joined: Sep 26, 2006
Posts: 25
thanks Peer..links were really informative !!

To repeat what others have said, requires education, to challenge it , requires brains.
I agree. Here's the link:
subject: Webservice - WSDL or Java Class
jQuery in Action, 3rd edition