This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes RestFul Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "RestFul" Watch "RestFul" New topic


John Nicer

Joined: Oct 08, 2009
Posts: 8
Hi Guru,
I am using netbeans but would like do simple Restful WS. I do write a simple hello world to get xml but How do I write a WS that can take in and spite out the output. Is there such tutorial material? Thanks.

Jim Akmer
Ranch Hand

Joined: Jul 06, 2010
Posts: 104
You need to implement Provider<Source> from
You get the xml payload and work with that. Check out for jax-ws provider interface and @WebServiceProvider annotation
Perhaps this examples can help
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
Implementing the Provider interface is one way to do it, but I would personally prefer using JAX-RS, which is the API for RESTful web services.
Here is a link to a tutorial to get you started:
There are more tutorials on about RESTful web services.
Best wishes!

My free books and tutorials:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: RestFul