Our project is not Struts based. We must expose operations as xml services (not standard web services) with a structure like the following one: <business id="login"> <parameter name="username" value="ronaldinho" /> <parameter name="pass" value="tiger" /> </business>
We want to migrate it to Struts, so the first step is to map that XML structure into an ActionForm... I think we must overwrite RequestProcessor doing:
public MyRequestProcessor extends RequestProcessor { ActionForm processActionForm( req, res ) { if (client is a xml service) { SAXBuilder builder = new SAXBuilder( req.getInputStream() ); ...
// THE MAIN PROBLEM IS HERE !! ActionForm form = new LoginActionForm(); <------
form.setUserName( username ); form.setPassword( pass ); return form; } else { return super.processActionForm( req, res ); } } }
My questions are: 1. How can I know the ActionForm class in each case (it is not always a LoginActionForm...)? 2. Is there any advantage/drawback with etending RequestProcessor? (maybe I can't use other RequestProcessors like Tiles or Validator ones) 3. Should we do anything with ActionServlet, extending it instead of RequestProcessor, etc.
Any kind of opinion, sugerence or any other consideration are welcome!!
Thank you very very much, Guido García Bernardo PD. BTW, is there any practical information or project about integrating Struts and standard webservices (soap...)?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]