• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mark Hansen - Converting servlet design to Webservices

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

regards,
Jalal
 
author
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Look ma! I'm selling my stuff!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic