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 Which way to create a web service? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Which way to create a web service?" Watch "Which way to create a web service?" New topic

Which way to create a web service?

ahmet oguz

Joined: Mar 08, 2006
Posts: 18
hi, I want to create a web service with axis 1.2 But i have some questions.

must I write an interface and then use java2wsdl to create wsdl and then use wsdl2java for skeletons and then write implementation and deploy? Only one way is this?
or can i write a implementation class directly and deploy web service?
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

I think you need to go through this document.
For deploying a java class directly as a webservice, see the JWS section.

apigee, a better way to API!
ahmet oguz

Joined: Mar 08, 2006
Posts: 18
I know this document an i read all parts of this document. My question is
if i write a class and then write service xml in serverconfig.wsdd and deploy my own application everything is ok. I can not use jws format.
But sometimes firstofall write interface then create wsdl and then create serverside skeletons and write implementation and then write xml in serverconfig.wsdd. what is the difference between these? Are there any advantages or disadvantages between these paths?(Not jws format)
NarendraBabu Bandaru

Joined: May 17, 2008
Posts: 20
I suggest the best way is going - WSDL2JAVA ..

First create the requirements into a XML Schema. With which you can easily create the WSDL and then with the help of wsdl2java tool, generate the required java files.

When you want to convert the existing functionality to a webservice, at that moment going JAVA2WSDL is good.

But if you are going for creating a new webservice, it is always good to go with WSDL First.
I agree. Here's the link:
subject: Which way to create a web service?
It's not a secret anymore!