kirino: How about communication between systems? Our team sometimes retrieve data from
good'ol legacy systems (Natural/Cobol) or sometimes just through web service. Other than using IBM HATS, can Struts handle these scenarios?
I'm having a hard time making RichFaces work on WAS. Must I give this one up
Haven't use WS in a while but let me give it a shot. This is how I think I would do it if I ever did it again.
You can provide an extra layer of abstraction between your Struts Action class and your Webservice lookup by using the Service Locator design pattern and Business Delegate pattern. Normally, this is used to lookup EJB components but same pattern can be applied in WS(I think).
WSLocator{
WSStub doLookup("String wsEndPoint"){
//do WS lookup stuff here
}
}
EmployeeService
List<EmployeeDTO> searchByName(String name){
//From here, it doesn't matter if your data came from a database or Webservice, let's try taking it from a WS though
WSStub wsStub = new WSLocator().lookup("http://www.myws.com/someservice.aspx?wsdl");
Document d = wsStub.searchByName(name);
//create a List, do parsing here , return List
}
}
And call this in your Action class
EmployeeService empService = new EmployeeService();
List<EmployeeDTO> empService.searchByName("Lam"); //returns all that has an occurence of Lam in the String
//forward in JSP, iterate in List to display

Convert limitations to great expectations... You are the creative force of your life...