422 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
For /deposit action, do the following:
1. Right-click /deposit action. Select Draw Draw Selected From in the
context menu.
2. Select <input> /deposit.jsp check box and click OK.
3. Press Ctrl+S to save your work.
The final Web diagram looks as shown in Figure 8-157.
Figure 8-157 The final Web diagram
To apply Branch Transformation Toolkit-specific settings to
struts-btt-withdrawal.xml, perform the following tasks:
1. Right-click the WebContent/btt/bank folder in the BTTBankWeb project,
select New Folder to create a new folder named business. Create a logic
folder under the business folder.
2. Copy BTTSystemData.xsd and cha.wsdl from the BTTBankProcess project
to the WebContent folder of the BTTBankWeb project.
3. Copy deposit.wsdl, deposit_ProcessPortType_SOAP.wsdl, and
depositInterface.wsdl from the btt.bank.business.logic package of the
BTTBankProcess project to the WebContent/btt/bank/business/logic folder of
the BTTBankWeb project.
4. Reopen struts-btt-withdrawal.xml by Open with Struts Tools BTT
Extensions command.
Running H/F 1 423
5. Click the WSIFMessage Mapper tab, click Add in the Defined WSIFMessage
Mapper section to add a mapper named requestMap. Click Add in the
WSIFMessage Mapper Elements section to add the elements shown in
Table 8-5 into Figure 8-158:
Table 8-5 Data elements defined in the requestMap
Figure 8-158 The requestMap and the data elements
Add another mapper named replyMap, and define the elements shown in
Tab l e 8-6:
Table 8-6 Data elements defined in the replyMap
Context data element WSIF message partkey Converter class name
AccountNumber AccountNumber
Amount Amount
Context data element WSIF message partkey Converter class name
TrxErrorMessage TrxErrorMessage
TrxReplyCode TrxReplyCode
424 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
6. Click the Action Mapping tab. Select the /deposit action in the Struts Action
List. You will see that BTT WSIF Action is selected as the Action Type in the
BTT Extended Struts Action Type section.
7. Click the Select WSDL button in the BTT Extended Struts Action Properties
section, and select the deposit_ProcessPortType_SOAP.wsdl file from the
/WebContent/btt/bank/business/logic directory of the BTTBankWeb project.
8. Enter the following values:
Validator Class: btt.bank.ui.struts.forms.WithdrawalXVal
WSIF to Context: replyMap
WSIF from Context: requestMap
9. Click Select Context next to the Action Context field, and select dsectxt.xml
in the presentation folder of the BTTBankBTT project. Choose
withdrawalServerCtx for the Action Context field, as shown in Figure 8-159.
10.Press Ctrl+S to save the changes.
Figure 8-159 Set up the WSIF Action for the deposit operation
11.In the BTT WSIF Action Map section, click Add to map an item using the
values specified in Table 8-7 on page 425. In this example, two zeros (“00”) of
AccountBalance AccountBalance
Context data element WSIF message partkey Converter class name
Running H/F 1 425
the TrxReplyCode means that the process ran successfully. When the Struts
extension receives the successful reply code, Struts performs the success
forward, /result.jsp, in this case.
Table 8-7 Properties for the success forward of the /deposit WSIF action
After adding the BTT WSIF Action Map, you will see it displayed as shown
in Figure 8-160:
Figure 8-160 Set the success forward for /deposit action
12.Save and close the Struts Tools BTT Extensions Editor.
To tailoring the deposit.jsp, perform the following steps:
1. Change the deposit.jsp file as shown in bold in Example 8-35:
Example 8-35 The final deposit.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/btt-html.tld" prefix="btt" %>
<btt:html>
<HEAD>
<%@ page
language="java"
contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"
%>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META name="GENERATOR" content="IBM WebSphere Studio">
<TITLE>deposit.jsp</TITLE>
WSIFMessage Part Key Struts Forward Name Return Result
TrxReplyCode success 00
426 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
</HEAD>
<BODY>
<btt:errors/>
<btt:form action="/deposit">
<TABLE border="0">
<TBODY>
<TR>
<TD align="right"><btt:label text="AccountNumber"/></TD>
<TD align="left"><btt:text property="AccountNumber"/></TD>
</TR>
<TR>
<TD align="right"><btt:label text="Amount"/></TD>
<TD align="left"><btt:text property="Amount"/></TD>
</TR>
<TR>
<TD><html:submit property="Deposit" value="Deposit" /></TD>
<TD><html:reset /></TD>
</TR>
</TBODY>
</TABLE>
</btt:form>
</BODY>
</btt:html>
To change the struts-btt-signin.xml to use deposit operation, perform the
following tasks:
1. Open the struts-btt-signin.xml file using Struts Configuration File Editor.
2. Click the Source tab and make the changes as shown in bold in
Example 8-36:
Example 8-36 Modified struts-btt-signin.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<struts-config>
<data-sources>
</data-sources>
<form-beans>
<form-bean name="signInForm"
type="btt.bank.ui.struts.forms.SignInForm"/>
</form-beans>
<global-exceptions>
</global-exceptions>

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines now with O’Reilly online learning.

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