TWS Workshop for NCB
For NCB Bank
What are Web Services?
Software can be accessed remotely using different XML-based
application that languages
It doesn’t matter...
• what kind of computer sends the message or on which operating system
it is running
• where in the world the client is sending the message from
• what language the software that the client is running on is written in
• to the client what type of SOAP processor is running on the server
Key Components
• SOAP
• specifies XML grammar for sending and responding to messages
For NCB Bank 2
Web Services: Key Components
• XML and XML Schema (Parts 1 & 2)
• language that all web services languages are built on
• HTTP
• standard that facilitates transfer of SOAP messages and WSDL
documents between computers
• Advantage: permitted through Firewall (unlike CORBA/DCOM)
• WSDL
• Specification that tells us how to describe a piece of software in
terms of the method calls it responds to. Described in abstract way,
independent of programming language
• Also contains concrete details of how to make the connection:
• Method Calls
• Parameters it accepts
• Responses it will send back
• Protocols it can process
• Data format specifications it can accept
• URLs for the service
For NCB Bank 3
T24 Business Service Definition
T24 Service Landscape
Business Services Business services are pre-packaged
(EB.SERVICE) in Model Bank.
Business Operations Business Operations are transactions
(PW.ACTIVITY)
with a defined function or query.
Custom operations can be defined in
T24 in the same way as input
screens. This includes new T24
Transactions Queries applications.
(VERSION + Function) (ENQUIRY)
For NCB Bank 4
T24 Functional Architecture
Indirect Channels Direct Channels
T24 Tech. Admin – Functional
Overview System Admin Architecture
Branch Call Centre Internet Mobile IVR 3rd systems BPEL
Bank Middleware (optional)
T24 Browser
Open Financial Service (Web Services, API, Messaging)
Security Management System
T24 Core Banking
Data Persistence
For NCB Bank 5
JCA Architecture
Java EE Connector Architecture (JCA)
• Java-based technology solution for connecting application servers
(Jboss) and Enterprise Information Systems (T24 on TAFC) as part of
an Enterprise Application Integration (EAI) solution.
• Requires a functionally-rich Application Server.
• JCA will not function under a simple web server like Tomcat.
Resource Adaptor
• A system-level software driver, which is used by a Java application to
connect to an EIS (T24 on TAFC).
Why JCA?
• Before JCA was defined, no specification provided a standard
architecture for integrating heterogeneous EIS systems.
• Enables an EIS vendor (Temenos) to provide a standard Resource
Adapter for its EIS (T24).
• Single resource adapter can plug in to any application server that
supports JCA. (JBOSS, WebSphere, WebLogic)
For NCB Bank 6
JCA Architecture
Benefits
• Independence from proprietary Temenos Connectivity Software
(TCServer)
• Simplification of Browser, ARC-IB and TWS deployment and
configuration
• Availability of standard message monitoring and integration tools
• Clients have existing configuration expertise.
TOCF(EE) supports two architectures:
• AGENT:
• Allows TWS to connect directly to T24 using the TAFC JCA and the
jbase_agent
• JMS
• Enhanced resilience and load balancing
• Both architectures:
• Lookup the TAFC JCA
• Call OFS.BULK.MANAGER as the entry point to T24
For NCB Bank 7
Three Tier “JMS” architecture
Server 1
T24 Browser T24 ARC-IB TWS
(BrowserWeb.war) (ARC-IB.war) (YourBank.war)
“JMS” “JMS” “JMS”
JEE Standard JMS Publisher
JMS Publisher - JNDI lookup of JMS connection
factory
Server 2
JEE Standard JMS Consumer
JMS Consumer - Leverages Application Server
(OFSMessage MDB) pooling, failover and load
balancing
T24 RA Industry Standard T24 JCA RA
(t24-ra.rar) - Provides connection, and
security management within a
scalable JEE environment.
tafc_agent tafc_agent tafc_agent tafc_agent Temenos Application Framework
TAFC runtime providing access to
T24 subroutines.
For NCB Bank 8
Temenos Open Connectivity Framework EE - TAFC
Interface Protocols
SOAP /
HTTP SSL WMQ JMS File
XML
Java EE Application Server
TOCF Plugins
(tocfplugin-ra.rar)
T24 Browser T24 Internet Banking TWS
(ARC-IB.war) (YourBank.war) TOCF Listener MDB
(BrowserWeb.war)
(tocflistener-ejb.jar)
Java Message Service (JMS)
Java Message Service (JMS)
(Optional)
OFS Message MDB
(tocfOFSmessage-ejb.jar)
T24 RA
(t24-ra.rar)
T24 Application Server
Temenos Application Framework
(tafc_agent)
For NCB Bank 9
TWS Composer: Flow Diagram
Developer IDE Web Application Server
Source
Control
2 Management
Generated T24 Web
Temenos Web service (MyBank.war /
Service Composer 3 MyBank.dll)
Generated WSDL
Generated Classes
1
4 5
T24 Application Server
ServiceLandscape OFS
(EB.SERVICE/PW.ACTIVITY)
For NCB Bank 10
TWS Java (EE)
Web
T24 T24 Web Generated Web Deploy
Services
Server Service Services Annotated Services Annotated
Definitions Classes Classes Interfaces
Generator Packages (WSDL)
XSD-based Temenos plug-in using “Code behind”
representation of the JAXB & AXIS to generate packages are
T24 system calls T24 business services annotated classes. ready to
execute.
Web
T24 T24 Web Generated Web Deploy Services
Server Service Services Annotated Services Annotated
Definitions Classes Classes Interfaces
Generator Packages (WSDL)
JAXB (JDK)
JAX-WS METRO
Supporting Technologies Supporting Technologies
Temenos Eclipse plug- Deployment target
T24 provides the service is coded to allow Eclipse developer tool is used to
dependent on
definitions to be deployed via a browsing of the T24 manually deploy the “code behind”
selected vendor &
number of core system calls using business services, and packages to the target runtime,
configuration of JEE
the same meta data as the UI. generation of the “code which causes the runtime to
server.
behind” packages. generate the WSDL.
For NCB Bank 11
Prerequisites : T24
T24Updates:
• T24 Core
• EB_Foundation
• New WS product and component data items
• EB_Interface
• Include additional information on the beginning of the OFS response.
• Supports Arrangement Architecture (AA)
• EB_PresentationServices
• Determine the type of a T24 data field when generating XML schemas
• Shared with new T24 UI (UX product)
• EB_Reports
• Return enquiry output in a modified format where the enquiry in question
is invoked from a Web Service
• Supports Paged Enquiries.
• EB_TransactionControl
• Recognise/accept ‘WS’ as a valid T24 product
For NCB Bank 12
Prerequisites : T24 (continued)
• WS Product
• WS_ConnectionSetup
• detects that an incoming message received by T24 originated from
either the TWS Eclipse tooling, or a deployed Web Service
• WS_Metadata
• generates XML schemas which describe applications, Versions &
Enquiries.
• Pre-R11:
• JF_Foundation (now replaced by EB_AgentFramework)
• entry point into T24 for TWS tooling (both platforms)
OFS.SOURCE
• Dedicated record for TWS
• Source Type: TELNET
• Attributes: TWS (multi-valued field)
• Deployment: Configure in t24-ds.xml tx-connection-factory
For NCB Bank 13
Prerequisites : Tooling & Deployment
Java Platform
• Eclipse 3.5 (Galileo) or , from R10: Eclipse 3.6 (Helios)
• Eclipse installation must include Web Tools Platform (WTP)
(included in the ‘Eclipse IDE for Java EE Developers’)
• Eclipse ‘Installed JRE’ must be JDK 6
• Enterprise application server :
• JBoss 4.2.3GA, 5.1.0GA and 6.0.0.Final
• Glassfish Server 3.0.1 on Sun Sparc
• WebSphere 6.1 and 7
• WebLogic 10.3 and 11g
Secure Sockets Layer (SSL) protocol
For NCB Bank 14
Workshop: Eclipse IDE
• EB.SERVICE
• ACCOUNT.MANAGEMENT
• QUERY.CUSTOMER
Eclipse IDE
• Plug-in deployment (\dropins)
com.temenos.tws.plugin_1.1.0.201012091043-R10.jar
• Run Eclipse.exe
• Select/create workspace & close Welcome screen
• JavaEE Perspective
• Create a new TWS Project
• File > New > Other > Temenos Web Services > TWS Project
• Name: signon1
• Tick ‘Enable project specific settings’
• Change Port to 20006
• Select business operations:
• Open Current Account LCY
• Query Business Partner > Enquiry > Find Customer
For NCB Bank 15
Eclipse Welcome View
For NCB Bank 16
Workshop: Prepare to deploy
• Click on Create Service
• Expand signon1 project to view imported schemas:
\WebContent\WEB-INF\xsd\
• Open \WebContent\WEB-INF\tws.properties & note connection
methods:
agent
jms
direct (not for production)
• Open \WebContent\WEB-INF\jboss-web.xml
Set jndi name to match TOCF(EE) connection factory:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<resource-ref>
<res-ref-name>jca/t24ConnectionFactory</res-ref-name>
<res-type>com.jbase.jremote.JConnectionFactory</res-type>
<jndi-name>java:jca/t24ConnectionFactoryTWS</jndi-name>
For NCB Bank 17
Workshop: Prepare to deploy (continued)
• remove this section from web.xml (not necessary from R11):
<!-- this is configuration for Log4j -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>1000</param-value>
</context-param>
<listener>
<listener-
class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<!-- end of configuration for log4j -->
For NCB Bank 18
Workshop: Deploy Web Application
• Deploy a Web Service to application server
• Application Server specific :
• jboss-web.xml
• ibm-web-bnd.xmi
• weblogic.xml
• Export WAR file
Right-click on project: signon1
Destination:
..\ ModelBank-
201012PB\3rdParty\jboss\server\default\deploy\signon1.war
• Logs:
• ..\workspace\.metadata\.log
• ..\jboss\server\default\log\server.log
For NCB Bank 19
Workshop: Browse Web Service
Browser:
• Browse to:
http://127.0.0.1:9095/signon1/services
• Select the WSDL link:
http://127.0.0.1:9095/signon1/services?wsdl
For NCB Bank 20
Workshop : End Point (WSDL)
http://127.0.0.1:9095/signon1/services?wsdl
For NCB Bank 21
Workshop : SOAPUI test
SOAPUI
• Create a test project based on a WSDL
• Create a T24 transaction via a SOAP Request
• View request & response in JBOSS console
• View INAU account using T24 Browser
• Run a T24 Enquiry via a SOAP Request
• View request & response in JBOSS console
• Supply in full with any support-request
• ..\ModelBank-201012PB\3rdParty\jboss\server\default\log\server.log
For NCB Bank 22
Workshop : Creating a Web Service client
Application Server Web Service Client
Generated T24 Web service
Consume.java
(signon1.war)
T24 Application Server
VERSION / ENQUIRY /
OFS
For NCB Bank 23
Workshop : Creating a Web Service client (cont)
Create a client to consume the Web Service (Java)
• Java client using Eclipse
• Generate client code
• Write a Java client
• Test using Console
JAX-WS (included in Java 1.6)
• Prepare.java
• Alternatives such as:
• AXIS2 (install runtime in Eclipse)
• Consume.java
• Three examples:
• Native: callOfs
• VERSION: openCurrentAccount
• ENQUIRY: findCustomer
For NCB Bank 24
Status object
successIndicator
• a string value indicating the success / failure of the web service request.:
Success request completed successfully
TWSError error occurred in TWS web application
T24Error T24 error encountered
T24Override Override condition encountered
T24Offline T24 System is offline
transactionId
• the T24 transaction id for the completed request
messages
• list of all success / error messages returned from T24 or TWS web
application
An AA Web Service may update multiple T24 applications:
• multiple Status and Business Objects returned.
• The successIndicator of each Status object should be checked
For NCB Bank 25
Custom Routines
Invoke T24 Subroutine via a Web Service
• Not defined in T24 service landscape (PW.ACTIVITY & EB.SERVICE)
Example OFS request:
SIGNON.WORK.BALANCE,,INPUTT/123456,,100485
SUBROUTINE SIGNON.WORK.BALANCE(CUST.ID,WORK.BALANCE)
$INCLUDE T24.BP I_COMMON
$INCLUDE T24.BP I_EQUATE
$INCLUDE T24.BP I_F.ACCOUNT
WORK.BALANCE = 0
CALL F.READ('F.CUSTOMER.ACCOUNT',CUST.ID,R.CUSTOMER.ACCOUNT,'',YERR1)
LOOP
REMOVE ACCT.ID FROM R.CUSTOMER.ACCOUNT SETTING ACCT.POS
WHILE ACCT.ID : ACCT.POS
R.ACCT = ''
CALL F.READ('F.ACCOUNT',ACCT.ID,R.ACCT,'',YERR2)
WORK.BALANCE += R.ACCT<AC.WORKING.BALANCE>
REPEAT
RETURN
END
For NCB Bank 26
Custom Routines: Steps required (Java)
Design
• Define the Web Service field parameters & data type (Request/Response)
• Define the inputs/outputs for the T24 routine
• Decide the message format to be passed
• OFS format or custom design
T24
• Write the Business Operation (T24 subroutine)
• Expose it in PGM.FILE as a type ‘S’ubroutine
Eclipse
• Modify beans.xml: define the class to be used for the Web Service
• Create a custom source folder
• Create a custom package
• Write a Request class and a Response class with annotations
• Write the Web Services implementation class
• Generate and deploy (standard procedure)
For NCB Bank 27
Workshop summary
You have now:
• Exposed T24 business operations as a Web Service
• Deployed a Web Service to an application server
• Tested a Web Service using SOAPUI
• Generated client code based on a WSDL
• Implemented client code
• objects
• auto-complete support
• industry-standard IDE and debugging tools
• Seen a Web Service Client written for .NET
• Language-independence
You have NOT:
• Written any jBC code
• Manually assembled or parsed an OFS string in code
For NCB Bank 28
TWS Consumer
Demonstration
• Create a TWS Notification project
• Define the event:
• Supply a name
• Select a Version and an Exit Point
• Select a Target service
• JMS Queue
• External Web Service (WSDL)
• Save the project – updates T24
• Export the Enterprise Java Bean (EJB)
• Authorise the VERSION and WS.EXIT.POINTS records
• Input a T24 contract (FUNDS.TRANSFER)
• Observe the delivery of the message
For NCB Bank 29
Summary
We have:
• Understood how TWS follows the standard Enterprise architecture
• TOCF(EE) 2 & 3 Tier
• Defined Business Services and Web Services
• Listed the pre-requisites for installing TWS
• Created, deployed & tested a Web Service
• Installed a Web Service client to consume a Web Service
For NCB Bank 30
Thank You
For NCB Bank 31