[Webwork-user] SOAP and Webwork - does it make sense
Brought to you by:
baldree,
rickardoberg
From: Peter K. <yel...@ya...> - 2002-07-04 01:28:35
|
I have been doing a lot of thinking recently about web services and whether it makes sense to adapt webwork to be called by a web service. After some discussion with a few people I have decided to document my thoughts here and see what people think. If this belongs in the dev list please let me know and I'll move the discussion over there. The two options we have: 1. Adapt webwork to work on the end of a web service by creating one or more new dispatcher servlets and a SOAP view technology. 2. Use RPC calls to our EJB's directly. I'll discuss the advantages and disadvantages separately. Option 1 - webwork ------------------ Advantages a. Webwork is already a good implementation of the command pattern with validation, processing and a generic error mechanism. This could all be reused. b. Webwork is a document oriented interface as opposed to a procedure oriented interface and as such is well suited to information that arrives in document form. c. Using webwork would allow our current action logic to be re-used with little or no modification. d. Webwork already has an XSLT presentation capability which would be readily adaptable to creating SOAP message bodies. Disadvantages a. Webwork action arguments are presented as a fairly flat structure with little hierarchy. Would it be a perversion of the architecture to adapt webwork to handle hierarchical XML input documents ? b. Webwork would not be well suited to application interfaces that were procedure driven rather than document driven. Option 2 - RPC -------------- Advantages a. There are some good tools available to allow the packaging of EJB methods as web services with minimum effort. b. RPC is a natural fit for interfaces that are procedure rather than document driven. Disadvantages a. Our EJB method calls are too granular to be useful as web services. Another layer would have to be constructed to provide the level of aggregation necessary in a web services context, a level of aggregation already present in the webwork actions. b. Integrated security between the servlet engine and the EJB server would have to be unpicked and the EJB security integrated with web services. c. A certain amount of processing infrastructure would have to be created to perform validation and error marshalling. -- Peter Kelley |