312 SOA Solutions Using IBM Information Server
// get value from result BO
DataObject tradesOutput = operationResult.getDataObject("output");
int result = tradesOutput.getInt("orderNumber");
return result;
Example 2-16 SCA binding ASYNC API client code
import com.ibm.websphere.sca.Service;
import com.ibm.websphere.sca.ServiceManager;
import com.ibm.websphere.sca.Ticket;
import com.ibm.websphere.sca.sdo.DataFactory;
import commonj.sdo.DataObject;
..........................
// lookup standalone reference
ServiceManager serviceManager = ServiceManager.INSTANCE;
Service updateProfileService = (Service) serviceManager.locateService("UpdateBrokerageProfilePartner");
// invoke the service asynchronously
Ticket ticket = updateProfileService.invokeAsync("updateProfile", customerInfo);
// wait for 5 seconds max
Object operationResult = updateProfileService.invokeResponse(ticket, 5000);
// get value from result BO
DataObject updateProfileOutput = (DataObject) operationResult;
String result = updateProfileOutput.getString("message");
return result;
2.9.1 Rational Application Developer (RAD)
We demonstrate the development and testing of client applications (JSPs and
portlets) accessing IBM Information Server and WebSphere Integration
Developer generated services using SOAP over HTTP, EJB, and JMS bindings in
a J2EE environment.
As shown in Figure 2-316 on page 308 and Figure 2-317 on page 308, the
following business function implementations using RAD are described here:
򐂰 Open a brokerage account (JSPs only)
򐂰 Perform a trade (JSPs and portlets)
򐂰 Get Account balance for the brokerage accounts (portlet only)
Chapter 2. Financial services business scenario 313
Figure 2-319 Developing a Struts application 1/23
Note: The JSP implementation of these business functions uses the Struts
framework.
“The Struts framework is based on the Model-View-Controller (MVC) design
paradigm that clearly separates the three levels. The Model represents the
business or database code, the View represents the page design code, and
the Controller represents the navigational code. The Struts framework is
designed to help developers create Web applications that utilize a MVC
architecture.
The Struts framework fills the View and Controller layers, while the Model layer
is left to the developer. The Struts framework stores application routing
information and request mapping in a single file named struts-config.xml
For more details on the Struts framework, refer to the Web site:
http://struts.apache.org/
In the following figures we show some aspects of Struts usage:
򐂰 Figure 2-319 on page 313 through Figure 2-341 on page 329 show the
development of a Struts framework application using RAD.
򐂰 Figure 2-319 on page 313 through Figure 2-327 on page 319 describe the
creation of a project with Struts support.
򐂰 Figure 2-328 on page 320 through Figure 2-333 on page 323 describe the
development of the Controller and View levels.
򐂰 Figure 2-334 on page 324 through Figure 2-341 on page 329 describe the
development of the Model level.
The struts-config.xml file used here is shown in Example 2-17 on page 329.
314 SOA Solutions Using IBM Information Server
Figure 2-320 Developing a Struts application 2/23
Chapter 2. Financial services business scenario 315
Figure 2-321 Developing a Struts application 3/23
316 SOA Solutions Using IBM Information Server
Figure 2-322 Developing a Struts application 4/23

Get SOA Solutions Using IBM Information Server now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.