views:

76

answers:

7

I'm relatively new to web services. I dont know how this web service will work. I didn't find any useful simple example of a web service by googling. Can any one please give me some tips or links to creating a web service using java.

A: 

If you use Spring, their web service module is a great way to create "contract first" web services.

duffymo
A: 

you could create a simple embeddable web-service using atmosphere framework. Atmosphere spade server supports jersey and has an embedded webserver called atmosphere spadeserver.

Alfred
+2  A: 

You could download Apache CXF and look at the samples.

bmargulies
A: 

There's a HelloWorld here

secmask
+1  A: 

You should take a look at Apache Axis implementing SOAP protocol, which plays a key role in web services. The messages being exchanged are soap messages having header with some metadata and body with the actual xml message. You will need also Apache Tomcat, Eclipse and its axis plugin to run this brilliant example .

lisak
Nooooooooo, not Axis, dammit! Consider a better JAX-WS stack like JAX-WS RI or Apache CXF instead.
Pascal Thivent
What's wrong with that, I think that Axis2 is good first WS hello world. I didn't have any problems with it in a few projects. Then I switched to spring WS, so that I can't say it's good or not in the overall.
lisak
A: 

I use SwordFish and started out with this Tutorial.

rancidfishbreath
A: 

I recommend Restlet for RESTful style web service. It allows you to support different representations, to be specific, it could pass or return the result in various kind of formats, such as JSON, XML, Plain Text, etc. Here is the link to download:

Restlet and Original Paper if you are interested in more.

Sheng Chien