wood burning stoves 2.0*
The moose likes Web Services and the fly likes Mark Hansen - Converting servlet design to Webservices Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Mark Hansen - Converting servlet design to Webservices" Watch "Mark Hansen - Converting servlet design to Webservices" New topic

Mark Hansen - Converting servlet design to Webservices

Jalal ud Din

Joined: Dec 20, 2006
Posts: 24
Hi Mark,
Currently I am developing a client server application. Java client (A command prompt based application) reads some data from com ports and converts this data to xml. It keeps adding data in xml for 1 hour and after every one hour it streams xml or http to a servelet. Servlet analysis the data and updates the database accordingly. Another servlet (server side) can communicate to dos based application by sending him xml at any point of time depending upon the user clicks on web. this xml is sent to dos based application and dos based application converts it to com commands and sends it to some hardware.

Do you think above problem can be better solved using web services? how?

Mark D. Hansen
Ranch Hand

Joined: May 29, 2007
Posts: 61
Unless you want to publish the servlet functionality so that other clients can use it, there is no reason to convert to a Web service. If it is only a single client using it - and you are designing both the client and the servlet - then it is fine.

The benefit of Web Services is that you could publish your server side application so that a variety of clients could access it using XML/HTTP or SOAP.

If you want to convert the application to Web Services technology, just as a learning exercise, then you can do that. Chapter 3 of my book shows how to do the kind of thing you are describing both with servlets and with the javax.xml.ws.Provider class for creating RESTful Web services.

Mark D. Hansen
Founder and President, AgileIT LLC http://agileitinc.com/
Author of "SOA Using Java Web Services" - http://soabook.com/
I agree. Here's the link: http://aspose.com/file-tools
subject: Mark Hansen - Converting servlet design to Webservices
Similar Threads
Chapter 2 (HFSJ) notes , may be useful for anyone
VS.NET 2003 Example App is somewhat architecturally similar to SCEA app
Java Servlets
Communication Architecture help needed