• 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

Web service vs. custom XML over HTTP solution?

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
We are having some debate here between using web services or a custom solution to allow large customers to perform account management using their own applications.
The custom solution would involve writing a servlet to accept connections and read/write XML messages. The advantage here seems to be that an application can perform multiple transactions over a single connection, rather than opening a new connection each time. Another plus is that we can define our own message format, regardless of serializers, etc.
The drawback is that it natually takes much more code to write and maintain. Also, it is not based on existing standards, and our customers cannot use tools to generate proxy code from the WSDLs as with web services.
It seems to be that the advantages provided by the tools and servers surrounding web services would outweigh the performance advantage of the single connection and custom solution.
Wanted to get some input from the brains here on this debate.
Thanks for any input.

Art
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You already mentioned perhaps the biggest trade-off: performance over tool support.
In your case, I'd say definitely go with web services. For internal interfaces a custom, specialized protocol is OK because it does perform generally better than more generalized standard protocols. However, if you intend to have your customers write client applications, you'd better use a standard -- otherwise they just might move to competitor's after an easier, standards-based integration...
 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
web services specifications allow to replace default serializers with custom serializers and deserializers.
Manas
 
Ted Bell
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. Had one more question I'd like to pose.
I have seen quite a lot of examples of using web services in the RPC form, but none really on using the document style. Can anyone point me to a good (simple) example of using doc style, including writing a client?
Also, I was wondering if the tool suppoort includes code generation for document-style WS? I have used examples with Axis and .NET, and the code generation for the rather simple examples is handy, but they were all RPC style. If I understand correctly, document style returns an XML document as the return type, so the client is responsible for parsing this as any XML document in order to get the result (and same true of the server when processing the request). Is this where JaxB comes in?
I read/heard that document-style is becoming the preferred method by some, but does it have the support/acceptance it needs yet?
Thanks for any reply.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Art Vandelay:
Thanks for the reply. Had one more question
I have seen quite a lot of examples of using web services in the RPC form, but none really on using the document style. Can anyone point me to a good (simple) example of using doc style, including writing a client?
Thanks for any reply.


For this you can try to deploy simple document webservice using axis

and try to use the tool WSDL2Java from Axis.(please see the axis documentation on how to use wsdl2java tool for generating client for the given wsdl.
BYW try to use the LATEST version of axis if you want to deploy your service in document style
 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Art,
Pretty much every web services platform I'm aware of supports document style web services. By document style, I presume you mean defining XML documents using XML schema and passing a single document as the argument to the operation and receiving an XML document back.
We've done it quite successfully on a number of platforms, including Apache Axis, Systinet WASP, BEA WebLogic and .NET. All of these platforms provide tools for the generation of code from WSDL that is defined as document/literal. The major down side is that most tools don't do a good job of java2wsdl for doc/literal (which I'm not a fan of anyway). Nor are there many tools for painlessly writing WSDL files from scratch. A couple I've found to work well are Altova XML Spy for the creation of XML Schemas and Cape Clear WSDL Editor (freely downloadable) for WSDL creation.
Mark

Originally posted by Art Vandelay:
Thanks for the reply. Had one more question I'd like to pose.
I have seen quite a lot of examples of using web services in the RPC form, but none really on using the document style. Can anyone point me to a good (simple) example of using doc style, including writing a client?
Also, I was wondering if the tool suppoort includes code generation for document-style WS? I have used examples with Axis and .NET, and the code generation for the rather simple examples is handy, but they were all RPC style. If I understand correctly, document style returns an XML document as the return type, so the client is responsible for parsing this as any XML document in order to get the result (and same true of the server when processing the request). Is this where JaxB comes in?
I read/heard that document-style is becoming the preferred method by some, but does it have the support/acceptance it needs yet?
Thanks for any reply.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic