Configuring the BTT definition files

About this task

You must configure the BTT definition files in the server side, and these files are in the src\definitions folder of the BTTJumpStartSampleServer Project. Do the following steps:

Procedure

  1. Update btt.xml file:

    Copy the btt.xml file from <toolkit_root>\lib\samples\ BTTJumpStartSampleEAR.ear\BTTJumpStartSampleServer.jar\definitions\ to the src\definitions folder of the BTTJumpStartSampleRCPClient Project.

    BTT provides a tool to configure the btt.xml file. For more information, see Deployment Descriptor editor.

  2. Update type.xml file:
    Replace type.xml file with the following:
    	    <type id="String" implClass="com.ibm.btt.base.DataField">
    		 <StringDescriptor id="typeDefault"   implClass="com.ibm.btt.base.types.ext.StringPropertyDescriptor">
    			<param id="initialValue" value="null"/>
    			<Converter convTypes="default" implClass="com.ibm.btt.base.types.ext.StringConverter"/>
    			<Validator implClass="com.ibm.btt.base.types.ext.StringValidator"/>
    		 </StringDescriptor>
    	     </type> 
         <type id="Amount" implClass="com.ibm.btt.base.DataField">
              <descriptor id="typeDefault" implClass="com.ibm.btt.base.types.ext.DoublePropertyDescriptor">
                   <Converter convTypes="default" implClass="com.ibm.btt.base.types.ext.FloatConverter">
                        <param id="size" value="8"/>
                   </Converter>
                   <Validator implClass="com.ibm.btt.jumpstart.sample.util.AmountValidator"/>
              </descriptor>
         </type> 
         <type id="Account" implClass="com.ibm.btt.base.KeyedCollection">
              <descriptor id="typeDefault" implClass="com.ibm.btt.base.types.KCollPropertyDescriptor"/>
              <dataDescriptor id="name" refType="String"/>
              <dataDescriptor id="type" refType="String"/>
              <dataDescriptor id="number" refType="String"/>
              <dataDescriptor id="amount" refType="Amount"/>                              
         </type>
         
    	     <type id="AccountList" implClass="com.ibm.btt.base.IndexedCollection">
              <descriptor id="typeDefault" implClass="com.ibm.btt.base.types.ICollPropertyDescriptor">
                   <param id="size" value="0"/>
              </descriptor>
              <dataDescriptor id="account" refType="Account"/>
         </type>
    Note: Copy the AmountValidator.java from <toolkit_root>\samples\BTTJumpStartSampleEAR.ear\BTTJumpStartSampleServer.jar\com\ibm\btt\jumpstart\sample\util\ to com.ibm.btt.jumpstart.sample.util package of BTTJumpStartSampleServer Project. It is used to validate the type Amount.
  3. Update data.xml
    Replace the data.xml with the following:
     <field id="TID" />
    	    <data id="userId" refType="String">
    		<param id="isMandatory" value="true" />
    		<param id="minLength" value="3" />
    		<param id="maxLength" value="20" />
    		<param id="description" value="userId" />
    	    </data>
    	    <data id="pw" refType="String">
    		<param id="isMandatory" value="true" />
    		<param id="minLength" value="4" />
    		<param id="maxLength" value="16" />
    		<param id="description" value="Password" />
    	    </data>
        <field id="CustomerId" />
        <field id="CustomerName" />
        <field id="HostBuff" />
        <field id="sessionID" />
        <field id="dse_locale" />
        <field id="dse_errorMessages" />
        <data id="accounts" refType="AccountList" />
        <field id="forwardName" />
        <field id="telephone" />
        <field id="address" />
        <field id="email" />
        <field id="locale" value="en_US" />
        <field id="dse_replyPage" />
        <field id="TrxReplyCode" />
        <field id="BranchId" hostId="BR" />
        <kColl id="sessionData">
    		<refData refId="TID" />
    		<refData refId="userId" />
    		<refData refId="CustomerId" />
    		<refData refId="CustomerName" />
    		<refData refId="HostBuff" />
    		<refData refId="sessionID" />
    		<refData refId="dse_locale" />
    		<refData refId="dse_errorMessages" />
    		<refData refId="accounts" />
    		<refData refId="forwardName" />
    	
    		<refData id="telephone" />
    		<refData id="address" />
    		<refData id="email" />
    	
    		<field id="currentStyle" />
    		<field id="currentLocale" />
    		<field id="currentDate" />
    	</kColl>
    
    	<kColl id="signInData">
    		<refData refId="userId" />
    		<refData refId="pw" />
    		<refData refId="locale" />
    		<refData refId="dse_errorMessages" />
    		<field id="dse_replyPage" />
    		<field id="outcome" />
    		<field id="errorCode" />
    	</kColl>
    
    	<kColl id="logOffData">
    		<refData refId="userId" />
    		<refData refId="pw" />
    		<refData refId="locale" />
    		<refData refId="TrxReplyCode" />
    		<field id="forwardName" />
    	</kColl>
    
    	<kColl id="branchData" dynamic="true">
    		<refData refId="BranchId" />
    		<iColl id="languages" size="2">
    			<kColl id="language">
    				<field id="name" />
    				<field id="locale" />
    			</kColl>
    		</iColl>
    	</kColl>
    
    	<kColl id="startupServerData">
    		<refData refId="TID" />
    		<refData refId="sessionID" />
    		<refData refId="TrxReplyCode" />
    		<field id="eventsPort" />
    		<field id="ipAddress" />
    		<field id="permanentConnectionForEvents" />
    		<field id="instanceId" />
    	</kColl>
    
        <kColl id="endSessionServerData" />
    
    	   <kColl id="withDrawData">
    		<field id="TrxId" value="Tx100" />
            <field id="TxReqXUIFile"    />
            <field id="TxRespXUIFile"   />
    		<field id="account" />
    		 
    		<field id="currency" />
    		<field id="amount" />
    		<field id="realAmount" />
    		<field id="certID" />
    		<field id="certType" />
    		<field id="feeType" />
    		<field id="fee" />
    		<field id="feeDiscount" />
    		<field id="feeRate" />
    		<field id="feeDiscountRate" />
    		<field id="customerName" />
    		<field id="customerType" />
            <field id="TrxReplyCode" />
            <field id="balance" />
    	</kColl>
  4. Update format.xml
    Replace format.xml with the following:
    <fmtDef id="startupReqFmt">
    <record>
    <fString dataName="TID" />
    <delim delimChar="#" />
    </record>
    </fmtDef>
    <fmtDef id="startupRecFmt">
    <record>
    <fString dataName="TrxReplyCode" />
    <delim delimChar="#" />
    </record>
    </fmtDef>
    
    
    <fmtDef id="logOffReqFmt">
    <record></record>
    </fmtDef>
    <fmtDef id="logOffRecFmt">
    <record>
    <fString dataName="TrxReplyCode" />
    <delim delimChar="#" />
    </record>
    </fmtDef>
    
    <fmtDef id="signInOpSendFmt">
    <record>
    <fString dataName="userId" />
    <delim delimChar="#" />
    <fString dataName="pw" />
    <delim delimChar="#" />
    <fString dataName="locale" />
    </record>
    </fmtDef>
    
    <fmtDef id="signInOpRecFmt">
    <record>
    <fString dataName="dse_errorMessages" />
    <delim delimChar="#" />
    </record>
    </fmtDef> 
     
  5. Update context.xml
    Replace the context.xml with the following:
         	<context id="branchServer" type="branch" parent="nil">
    		<refKColl refId="branchData" />
    	       </context>
    
    	     <context id="sessionCtx" parent="branchServer" type="session">
    		<refKColl refId="sessionData" />
    	      </context>
    
    <!Server CONTEXT DEFs.=================================================== -->
         <!--=========================================================================-->
         <!-- StartUp Operation Context                                               -->
         <!--=========================================================================-->
    	     <context id="startupServerCtx" type="op" parent="branchServer">
    		<refKColl refId="startupServerData" />
    	     </context>
         <!--=========================================================================-->
         <!-- End Session Operation Context                                           -->
         <!--=========================================================================-->
    	     <context id="endSessionServerCtx" type="op">
    		<refKColl refId="endSessionServerData" />
    	     </context>
         <!--=========================================================================-->
         <!--SignIn Server Operation Context                                           -->
         <!--=========================================================================-->
    	<context id="signInCtx" type="op">
    		<refKColl refId="signInData" />
    	     </context>
         <!--=========================================================================-->
         <!--LogOff Server Operation Context                                           -->
         <!--=========================================================================-->
    	<context id="logOffCtx" type="op">
    		<refKColl refId="logOffData" />
    	    </context>