RE: Struts and webservices

2004-01-19 Thread Sandra Cann
> PD. BTW, is there any practical information or project about 
> integrating Struts and standard webservices (soap...)?

Yes, have a look here for a description of a Struts and Expresso based
webservices implementation using Apache Axis :
http://www.jcorporate.com/econtent/Content.do;jsessionid=a57s8imLRm08?state=
resource&resource=801. 

Or to access all related Expresso WebServices documentation see
http://www.jcorporate.com/econtent/Content.do?state=template&template=2&reso
urce=738&db=default

This project's source code is available but is not free $.

Cheers
Sandra Cann


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts and webservices

2004-01-19 Thread Greg Hess

Hi Guido,

I have recently migrated a proprietary(non-standard) web service
implementation in a Struts based web app using Apache Axis
http://ws.apache.org/axis/.

Struts and Axis are both servlets, Axis handles all XML messages and
Struts handles all form processing. If all you need is another way to
process your web service calls just use Axis or some other web service
framework and leave Struts for form processing, templating/tiles and
validation. The code snippet you have provided is exactly what a web
service framework will do for you.

HTH,

Greg
  
> -Original Message-
> From: Guido García Bernardo [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 19, 2004 3:01 PM
> To: Struts Users Mailing List
> Subject: Struts and webservices
> 
> Hello
> 
> Our project is not Struts based. We must expose operations as xml
> services (not standard web services) with a structure like the
following
> one:
> 
> 
> 
> 
> 
> 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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]