So, maybe you would have Laszlo and Struts controlling the web interface (page display and page flow control), and then the web service handles stuff like database access.

I'd suggest that you check whether or not the user is logged in before calling the web service. If the user isn't logged in you want to display a login screen. If the user is logged in you can call the web service, passing in the user name, and the service can check if the user has permission or not. If the user doesn't have permission, the service can throw a fault , in which case the control layer (in struts or whatever) would display an error screen.

In any case, it sounds strange for Struts to intercept web service calls. Instead, the struts Action calls the web service and then based on the result of that call, decides what page to display next.

Bill

Abdullah Jibaly wrote:

That's true, Laszlo is only a presentation layer. I
wasn't necessarily meaning struts itself, just any
controller layer that would be able to validate I'm
logged in with a session, validate the data input, the
business flow, etc.

Here's an example I have in mind:

Laszlo presentation layer calls UpdatePersonService
(SOAP) and passes a Person object. Before the
UpdatePersonService actually receives control, I want
the controller to (a) check the session & make sure
I'm logged in, make sure I have permission to call
this service, etc.


Thanks,
Abdullah

--- Bill Keese <[EMAIL PROTECTED]> wrote:


--------------------------------- Never used Laszlo before but it sounds like both laszlo and struts arelibraries for building your presentation layer. Thus, you should useone of them, not both. Why are you talking about struts?

Abdullah Jibaly wrote: Bill,Thanks for the input. However, my presentation
layeris going to be Laszlo, and I want to communicate
withthe business layer using axis. That's why I can't
getto struts, axis will be processing the request
first.Thanks,Abdullah --- Bill Keese
<[EMAIL PROTECTED]> wrote: Abdullah Jibaly wrote: I want my view layer to communicate withthe business
layer using web services ... Ican't use a standard MVC
framework like struts since the request is sent to AxisServlet, right? As far as I understand, people usually talk
aboutseparating the "presentation layer" and the
"business layer",rather than separating the "view
layer" from the "business layer". So, itsounds like
you should write the presentation layer (model,
view,and controller) in struts, but the struts Actions
should call the"business layer" via web services. IE,
the parts relating to displaying webpages and to web
page flow should be in struts, and the Businesslayer
contains "support" functions like "addEmployee()".What
do you think?Bill







Reply via email to