We help IT Professionals succeed at work.

Setting Up a Web Service

Hi Experts...
I am a newbie to web services.
I have an assignment to set up a web service in unix environment with the following specifications specified.
How do i do the same.
Please help...
Specifications:
Using CATALINA_BASE: /local/tomcat-11.0.20
Using CATALINA_HOME: /local/tomcat-11.0.20
Using CATALINA_TMPDIR: /local/tomcat-11.0.20/temp
Using JRE_HOME: /opt/java/jdk1.6.0_27
Using CLASSPATH: /local/tomcat-11.0.20/bin/bootstrap.jar:/local/tomcat-11.0.20/bin/tomcat-juli.jar
Server version: Apache Tomcat/11.0.20
Server built: Jan 11 2011 05:34:27
Server number: 11.0.20.0
OS Name: SunOS
OS Version: 5.9
Architecture: sparc
JVM Version: 1.6.0_27-b07
JVM Vendor: Sun Microsystems Inc.
bash-2.05$ id -a
uid=xxxxx(tomcat) gid=xxxxx(tomcat) groups=xxxxx(tomcat)

Open in new window

Comment
Watch Question

Author

Commented:
Hi experts
Can anyone help me with the same
Top Expert 2007

Commented:
Web services work by putting a listener on a Web server for a specific set of requests.

So all you need is to write a servlet as a listener to be installed in the Tomcat environment.   The versions you list seem fine, so there's nothing special to worry about.

Author

Commented:
@mrcoffee365: Thanks for the reply.
Can you give a sample servlet doing the same.
Please help...

Author

Commented:
@mrcoffee365 : If you could provide a step by step procedure to do the same it would be of great help.
And how can i test the same.
How do i register the web service using UDDI.
How to write the WSDL for publishing the web service.
And how does the client give soap request and how does the server give the response.
Please help...
Top Expert 2007
Commented:
There are many tutorials online about how to build Web services.  This is a good one:
http://www.inf.fu-berlin.de/lehre/SS03/19560-P/Docs/JWSDP/tutorial/index.html

I'm pretty sure I've seen other questions from you which indicate that you know how to write a servlet, so perhaps you need to try it then ask EE for help if you run into problems.  

There is a ton of documentation about registering a web service with UDDI.  For example:
http://java.sun.com/developer/technicalArticles/WebServices/WSPack/
http://www.ibm.com/developerworks/webservices/library/ws-wsdl/

You can generate a WSDL with a number of tools, including Eclipse:
http://netbeans.dzone.com/news/5-techniques-create-web-servic
http://wiki.eclipse.org/Creating_a_Top-Down_Java_Web_Service_Skeleton_from_a_WSDL_Document

You need to try some development then ask questions about problems you run into, if any.

Top Expert 2007

Commented:
There's also the axis package, which a lot of people use:
http://axis.apache.org/axis/java/reading.html