I'd recommend two feature additions to make this useable for document style SOAP messaging:
1) Put a configurable XML transformation pipeline before the SOAP message gets interpreted for parameters, and after the response is created. The pipeline for the response should start with auto-generated request XML (via something like XStream).
2) Improve the request parameter schema for the incoming XML document to include XPath paths as parameter names. This way, using something like JXPath, a complex XML element could be automatically created, to be then transformed by the pipeline. Send the resulting XML to the action via a wrapper action form or even just put it in the request. Better yet, have the resulting XML be processed by an XML binding framework like XStream to create arbitrary Java objects to be passed to the action.
The key is to enable any XML schema to be used as input and output. The XML pipeline further isolates you from schema changes.
Finally, I'd also recommend looking at using struts-chain rather than a RequestProcessor. If the above functionality was decomposed into different Commands, one could easily plug in, say, a different XML binding framework or get rid of the XPath processor altogether.
Don
Duncan Mills wrote:
Didn't mean to be harsh - I was just presenting the alternative viewpoint that has to be answered. Personally I can see the benefit that this project could offer, but the counter stance is a one to raise is it not?
Regards
Duncan Mills Senior Principal Product Manager Oracle Application Development Tools
Jung, Eric wrote:
Wow, that's kind of harsh, Duncan.
-----Original Message----- From: Duncan Mills [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 3:38 AM To: Struts Developers List Subject: Re: Struts Web Services Enablement Project
Frank forgive me here, but playing Devils Advocate, if you have clean MVC separation then surely the last thing you want to do is to expose Actions as Web Services.
It is reasonable to want to expose Business Service Providers such as EJB, or TopLink beans as Web Services but that's up in the model layer, what's the point in pushing the access point down into the Controller code?
Or do you see here a solution for all those folks who've not followed best practice and have intermingled Controller functionality with Business logic..?
Regards
Duncan Mills Senior Principal Product Manager Oracle Application Development Tools
Frank Zammetti wrote:
Hello devs! This is my first time posting here, and my first attempt at contributing to an Apache project. I hope I'm going about it properly! :)
In short, I have a little project going with the stated goal of allowing a Struts developer to expose any existing business logic, as implemented in Struts Actions and their subordinate helper classes, as Web Services, and do this with NO changes required to any existing application code, and as little change to Struts itself as possible. Simplicity is the key to this!
Today I released a second version of this project to the user's mailing list, and after some feedback I think it's at a point where I'd like to make you all aware of it, and get some higher-level feedback. It's certainly far from complete at this point, but I think even now it's in a useful form.
My hope is that eventually it will be good enough to be included in the base Struts distro, but that's obviously a long way off, if ever.
With all that in mind, please at your convenience visit http://www.omnytex.com/strutsws
There you will find some more detailed technical information and a download which contains everything you need, including a simple sample webapp demonstrating the whole mess.
I thank you in advance for any time you spend on this!
Frank W. Zammetti
_________________________________________________________________
Looking to buy a house? Get informed with the Home Buying Guide from MSN House & Home. http://coldwellbanker.msn.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]