[Webwork-devel] SOAP and Webwork - does it make sense
Brought to you by:
baldree,
rickardoberg
From: Peter K. <pe...@mo...> - 2002-07-10 06:39:22
|
OK here is what I came up with in terms of some possible use cases, feel free to critique away: Use Case 1: Custom Input Processing 1. SOAP message arrives 2. setXML(???? xml) method gets called on the action with the contents of the SOAP body (not sure which format to use here, perhaps a String). 3. prepare method gets called to allow the action to parse the XML and set action properties 4. doValidate() and doExecute() get called as normal Comments: - This allows for the times when the input document needs special processing before the properties get set - Another possibility would be to have an action interface that also accepted the complete SOAP message to allow header processing as well. Use Case 2: Stylesheet Input Processing 1. SOAP message arrives 2. The appropriate stylesheet for the incoming message is selected based on the URL and run on the SOAP body. The output format produced is identical to that used by the XSLT view. This transformation could be the identity transformation if the input is already in that format. 3. The resulting XML is parsed and used to set the action properties. 4. doValidate() and doExecute() get called as normal. Use Case 3: Custom Output Processing 1. doExecute() is called on the action 2. The getXML() method on the action is called to allow it to produce the output XML in a custom fashion. 3. The resulting XML is wrapped in a SOAP message and sent back to the caller. Use Case 4: Stylesheet Output Processing 1. doExecute() is called on the action 2. The appropriate output stylesheet is selected based on the view requested 3. XML is produced from the action using the same code as for an XSLT view. 4. The stylesheet is run on the XML 5. The resulting XML is wrapped in a SOAP body and sent to the caller. Use Case 5: Error processing 1. doValidate() or doExecute() is called producing one or more error messages 2. The appropriate error output stylesheet is selected based on the view requested 3. XML is produced from the error messages using a similar format to that used by the XSLT view. 4. The stylesheet is run on the XML 5. The resulting XML is wrapped in a SOAP fault message and sent to the caller. Saturday, July 6, 2002, 6:58:02 AM, Matt Baldree wrote: MB> I read several articles concerning REST and I agree with its conclusions on MB> RPC and yes, it would be nice to let the WW's actions still drive the MB> application and allow views produce the appropriate output. Since you guys MB> brought this up maybe you are up to putting a prototype together to see if MB> it makes sense to call webservices through a normal MVC web tier or into an MB> EJB tier directly. I guess that is the real question we are trying to MB> answer. I'll be happy to participate/critique/do nothing. What do you say? MB> -Matt -- regards, Peter Kelley MoveIt Pty Ltd "If you want to build a ship, don't drum up the men to gather wood, divide the work and give orders. Instead, teach them to yearn for the vast and endless sea." - Saint-Exupery |