Discussions

XML & Web services: Web Services Vs Servlets Model

  1. Web Services Vs Servlets Model (1 messages)

    HI WS Gurus
    Even after going thru Web Services specs related to SOAP, UDDI & WSDL, one simple thing still I'm not understanding.

    Background - Few years back, while working for client having n number of Applications & their integration, I implemented Servlet based solution. It comprised of publishing URLs which when you call passing some parameters, you will get required response. If you want to know about the URL service, than pass "info" keyword to calling URL and in return you will get the usage information. This way, 3 applications working on Java Servlets, Microsft ASP & Perl CGI were integrated to internal as well external clients.

    Now my question is when we have such simplistic solution available for integration, than why to consider Web service for simple requirements. There may be some complex requirements where this simplistic model may not work, but the solution I provided to my client, I feel is one of the very good approach for interaction between different technology applications. Than, why do most of developers are rushing blindly to adapt this technology which is nothing but too much of over engineering for simple publishing requirements. Please enlighten me with your comments.

    Thanks a lot & Regards
    KP
  2. Web Services Vs Servlets Model[ Go to top ]

    You are ignoring the role of Web Service tools in your analysis. Hardly anyone works directly with SOAP, UDDI and WSDL; the tools do all the hard work for youl. A decent Web Service toolkit (including free ones like Apache's Axis) makes simple Web Service trivial:

    1) Write a (nearly) normal Java class.
    2) Deploy the class in Axis (which runs on any Servlet 2.2+ compliant servlet engine)
    2) Generate the WSDL automatically.
    3) Use JAX-RPC to generate client-side stubs.

    The .NET tools are just as easy.

    If you take your approach, you have to crank out more or less everything manually. Still, your approach is also viable for simple cases, because they are, well, simple.