struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido García Bernardo <>
Subject Struts and webservices
Date Mon, 19 Jan 2004 20:01:09 GMT

Our project is not Struts based. We must expose operations as xml
services (not standard web services) with a structure like the following
    <business id="login">
        <parameter name="username" value="ronaldinho" />
        <parameter name="pass" value="tiger" />

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:
For additional commands, e-mail:

View raw message