Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

TWS Composer (.

NET)

User Guide

Page 1
Document revisions
Date Author Changes Made
25/02/2010 Sunil Magesh Initial revision
24/03/2010 Sunil Magesh Revision made to update App settings Configuration
21/05/2010 Sunil Magesh OFS Features / Company code /OFS web method
supported in this release. Configuration tab is removed.
Refer Page: 21

23/07/2010 Sunil Magesh Update for High availability, Connection Pooling.


21/09/2010 Sunil Magesh Renamed Available Landscapes to T24Services in TWS.t24
24/01/2011 SunilMagesh Update for T24ServiceConnector and configuration

Page 2
Contents
Introduction ....................................................................................................................................................... 4
Overview........................................................................................................................................................... 4
Assumptions ....................................................................................................................................................... 5
Environment Configuration ...................................................................................................................................... 6
TWS Routines ................................................................................................................................................. 6
Compile TWS Routines ....................................................................................................................................... 6
TEMENOS T24 Functional Setup ............................................................................................................................ 6
Nremote Driver Setup ....................................................................................................................................... 7
Using TWS ........................................................................................................................................................ 8
Create TWS Project .......................................................................................................................................... 8
T24ServiceConnector Setup ................................................................................................................................ 15
Deploy TWS Project / Web Service ...................................................................................................................... 21
Tester & Configuration Tab ............................................................................................................................... 24
Logging and Security .......................................................................................................................................... 25
TWS Logging ................................................................................................................................................ 25
T24ServiceConnector Logging.............................................................................................................................. 26
Security ...................................................................................................................................................... 26
Configuration.................................................................................................................................................... 27
T24ServiceConnector ........................................................................................................................................ 27
TWS .......................................................................................................................................................... 31
Resources... ..................................................................................................................................................... 32

Page 3
Introduction
R10+ TEMENOS Web Service Composer is a tooling to expose Service Landscapes from T24 as
Ws-I compliant Web APIs’ using Nremote connectivity. TEMENOS Web Service Composer is an evolution
on the existing products of similar functional specification.

Note: Here in after TEMENOS Web Service Composer will be referred as TWS.

TWS is a simple tooling developed using industry standards and technology. It is designed for
people with web services skills who want to use TEMENOS T24.
 Provide multiple service landscapes
 Create web services with minimal input
 Use Nremote driver for connectivity

Overview
TWS as a tooling exposes Business Services and Business operations as Ws-I compliant Web APIs’ using
Nremote connectivity.

 Business services and operations in T24


- Business services (EB.SERVICE) are composed of business operations (PW.ACTIVITY)
- A business operation is a transaction (VERSION + FUNCTION) or a query (ENQUIRY)
 Connectivity
- Nremote driver for communicating with TEMENOS T24

Page 4
Assumptions
This document describes many concepts and methodologies that are highly technical in nature,
and as such prerequisite knowledge of the following is considered essential:
 Microsoft .NET 3.5 Framework SP1
 Visual Studio 2008 SP1
 WCF 3.5
 IIS 5.1 and above
 Secure Sockets Layer (SSL) protocol

Page 5
Environment Configuration

TWS Routines
These routines generate the “.xsd “files from a T24 server for the respective Version/Enquiry. These routines are shipped with T24
installation kit.
Note:
Note Contact Distribution for taking the latest TWS routines.

Compile TWS Routines


 Ensure the TWS routines are present in the directory where T24 is installed and compiled.

TEMENOS T24 Functional Setup


 Create the required Business operations (PW.ACTIVITY) in TEMENOS T24
 Map the newly created Business operations (PW.ACTIVITY) to the Business Services (EB.SERVICE) in TEMENOS T24
 Create a OFS Source id as
• Syntax Type : OFS
• Source : TELNET
• Attribute : TWS

Note: The description provided while the creation of records in PW.ACTIVITY & EB.SERVICE should satisfy the below conditions,
 The description should not be repeated
 The description should not have special characters

Page 6
Nremote Driver Setup
Setup
Using Nremote, the JAgent has to be started for establishing the connectivity between TWS and TEMENOS T24. SSL certificates has
to be created with DN name TEMENOS and used while starting the JAgent. Thus the connectivity between TWS and Nremote is secured
using certificates. For more information on certification creation and its installation kindly refer the ReadMe.htm under sample certificates.

JAgent may be started from the command line/shell via the following executable:
jbase_agent [<service options>] [<options>]
Where the options supported for TWS connectivity are:
jbase_agent -p [PORT NUMBER]
Example:
jbase_agent -p 33333
(or)
jbase_agent -p [PORT NUMBER] -c [CERTIFICATE PATH] -k [KEY PATH]
Example:
jbase_agent -p 33333 -c c:\openssl\bin\keys\cert.cer -k c:\openssl\bin\keys\key.pem

Note: For other options and to start JAgent as a service kindly refer the Nremote user guide.

Page 7
Using TWS
Create TWS Project
 Open Visual Studio 2008
 Create New project
• FileNew Project

Page 8
 Choose TEMENOS WebService under Visual C#
• Visual C#TEMENOS WebService WebService Composer
• Name the project and click OK

Page 9
 Confirm the new project has been created by noticing the following
• Message in the left bottom pane of Visual Studio 2008. Creating Project [PROJECT NAME]… project creation successful.
• Open Solution Explorer, view the project created.
• Double click on TWS.t24 file

Page 10
 Right click on the T24Services, a context menu appears.
• Choose Connect
Note: Refresh and Disconnect option will be enabled after Connection is established. Then the Connect option will be
disabled. The Refresh option is provided to reload the Landscapes from T24.The disconnect option clears the landscape
tree view and keeps the TWS composer in a disconnected state.

• Log On pop up appears


• Specify the IP address where the JAgent; is started
• Specify the port number in which the JAgent is started
• Click Connect

• Once the connection is authenticated, the Business services and Business operations will be displayed for selection which
are configured in T24
• Choose the Business operations, for which Web Apis (methods) has to be created
• The Service Properties Pane will indicate the information of the respective Business operation selected.
• Click on Create Web Service

Page 11
• Wait for the progress bars indication
• During the process, the progress bar will hold the status of the process
• Once the process is completed the progress bar will close automatically
• For every Input function web method created, an equivalent web method for Validate function is created.
• CallOFS is the web method provided in the [PROJECTNAME].svc file, by default on creation of any version/enquiry, to
Send OFS message.
• CallOFSML is the web method provided [PROJECTNAME].svc file, by default on creation of any version/enquiry, to Send
OFSML message.
• NativeMessage.svc is a default endpoint configuration file which has CallOFS and CallOFSML web methods. If one need to
use only these methods then it is not necessary to create any other web methods. Publishing the project as it is
sufficient.
Note:
Note If web service creation is done for version/ enquiry then two .svc files will be found under the project,
NativeMessage.svc and PROJECTNAME.svc. Both will have CallOFS and CallOFSML web methods.

OFS Source ID Configuration:


All web methods expects the OFS Source ID used by TWS to be created/configured in T24 area as below,
• Syntax Type : OFS
• Source: TELNET
• Attribute : TWS

CallOFS method will provide the ofs response in TWS specific format if the ofs source id is configured as mentioned above.
To get the OFS response in Native OFS format then OFS Source ID used by TWS has to be created/configured in T24 area
as below,
• Syntax Type : OFS
• Source : TELNET
• Attribute field Value should be left empty.

Page 12
Page 13
• Open Solution Explorer and click on Show all files icon
• The Newly created [PROJECT NAME].svc file is shown
• Double click on it to view the newly created WCF service file for the chosen Business activities.

Page 14
T24ServiceConnector Setup
Web Services created by TWS Composer establishes connection with T24 through T24ServiceConnector hosted in IIS by endpoint
configuration. This type of architecture implements a scalable mechanism to add additional connectors to T24ServiceConnector and leverages
WCF connection handling properties such as e.g. service throttling.
T24Service connector provides the following,
 Connection factory/connection pooling – establishes connection with the configured JAgents’.
 Load balancing /high availability – provides load balancing within the configured JAgents’.
 OFSML-OFS Parser – Converts incoming OFSML request message to respective OFS request message format and sends to T24. Then
the OFS response message is converted to respective OFSML response message.

Deploy
 Copy the T24ServiceConnector directory from the TWS install kit to the deployment server machine
 Open IIS (start  Runinetmgr)
 Choose the site to be hosted. Let’s assume it as Default Web Site. Right Click on it and choose Add Virtual Directory
 Provide the Alias name and the path of the T24ServiceConnector(copied)
 Refer configuration section to configure the connectors.
 Once configured ,right click on T24ServiceConnector.svc in the hosted directory and choose browse
 Copy the wsdl url
 Under the TWS project (solution explorer) expand the Service Reference node, choose T24Connector and right click on it.
 Choose Configure Service reference and paste the wsdl url in the Address bar and click ok.
 Refer the configuration section to configure the web.config with Service connector instance details.

Note: TWS Composer in Visual Studio establishes connection with T24 through JAgent directly and not through
T24ServiceConnector.Configuration of connectivity is described below in the Configuration Section.

Page 15
• Click on the Green Icon on the top to host the web service for testing.

Page 16
• Choose Run without Debugging on the following pop up and click OK
Note: If Modify the Web.config file to enable debugging option is opted then this pop up disappears while running the
project next time. If chosen it debugging disabled in the Web.config before deploying in the website to a production
environment

• On successful execution the below browser window appears

Page 17
Page 18
• Copy the WSDl url from the browser
• Open WCF Test Client ,Click Add Service
• Paste the url as http://localhost:7955/DemoTWS.svc?wsdl and click Ok

Page 19
• Choose the method to test
• Enter the input parameters
• Click Invoke
• View the response in below grid.

Page 20
Deploy TWS Project / Web Service
• Open Solution Explorer
• Right click on the below mentioned files to include in project
• [TWS Project]\bin\ {All dlls except the [Project Name.dll & Project Name.pdb]}
• [TWS Project]\External\xsd\{All xsd files}
• [TWS Project]\[Project Name].svc

Page 21
• Click on Build Menu and Choose Publish[Project Name]

• Click Browse on the pop up window


• Choose Intended operation
• To deploy in the IIS of same machine choose Local IIS
• Choose Default Web site
• Click open
• Specify the target location { http://localhost/{DeployingName} }
• Choose All Project files
• Click Publish

Page 22
• Open IIS
• View the deployed Web Service

Page 23
Tester & Configuration Tab
• OFS Tester Tab
• Allows the user to test the connection by passing OFS Message

• Configuration Tab
• Removed Configuration Tab, as the Company code is provided as a user parameter in the Web Request
Common class object of the web method.

Page 24
Logging and Security
TWS Logging
Logging plays a vital role in any application/product, TWS provides quality logging and ease in its configuration. There are two
files for logging configuration,
• devenv.config – Used for the logging purpose of TWS composer (C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE\ devenv.config)
• web.config –used for Web service logging (Under the TWS project created)

The logging technology used by TWS is Microsoft Enterprise Logging. There are 5 different categories of logging such as,
• Info – Provides the informative logs
• Timing – Provides the time consumed in each layer
• Debug – Provides detailed descriptive logs
• Decrypted –Provides the decrypted message (OFS) content
• Error – Provides the error logs

By default Logging is enabled and the category filter is defaulted to Info and Error. The logs are stored in the below path for every
project created respectively.
Path: [Project Name]\External\Logs\
Note: The configuration can be modified as required. It is recommended to install Microsoft Enterprise Library 4.0 to modify the config in
ease. Once installed, right click on the web.config file and choose Edit Enterprise Library configuration

Page 25
There are two different log file names created,
• WebComposer.txt – This file is created to log the TWS composer log information
• WebService.txt – This file is created to log the Web Service log information

T24ServiceConnector Logging
• web.config –used for T24 Service Connector logging (Under the T24ServiceConnector directory)

The logging technology used by T24ServiceConnector is Microsoft Enterprise Logging. There are 5 different categories of logging such as,
• Info – Provides the informative logs
• Timing – Provides the time consumed in each layer
• Trace – Provides detailed descriptive logs
• Warning –Provides the warning logs
• Error – Provides the error logs

By default Logging is enabled and the category filter is defaulted to Info and Error. The logs are stored in the below path for every
project created respectively.
Path: T24ServiceConnector\External\Logs\ T24ServiceConnector.txt

This logging ensures that the log entries are consistent and that messages can be inter-related by means of the request id.

Security

TWS provides the high end standard technology.


• The communication between TWS /T24ServiceConnector and Nremote(jagent) is secured by SSL Certificate.
 The certificate should be produced with a DN Name .Example :“TEMENOS”
 Install the certificate, in both machines where TWS and Nremote(jagent) runs

• The communication between the External Interface and the Web service is configurable as required by the developer in the
web.config file
WCF provides various bindings and security methodologies, all of them are configurable in the web.config file, kindly refer the
resources section for the links on security implementation

Page 26
Configuration
Configuration
T24ServiceConnector
T24ServiceConnector has two files for configuration,

Conf/connectors.xml - The connection properties to T24 (jAgent) are specified in the connectors configuration file
Web.config – used for configuring T24ServiceConnector logging, WCF service binding properties/reader quotas/Connector properties

Connectors.xml:

Page 27
Id
Id Identifies the T24 service connector instance
URL
URL WCF Service URL
Note: Use the HttpCfg.exe tool
1. Go to Start > Accessories > Command Prompt > Right-Click (Run as Administrator)
2. Execute this at the command prompt:
netsh http add urlacl url=http://+:6060/T24ServiceConnector user=DOMAIN\username
6060 here is your port number, you can replace this with a port number of your choice (using which your WCF service is hosted)
Ex:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC> netsh http add urlacl url=http://+:6065/ServiceConnectorT24 user=IIS_IUSRS
You should get a message saying “URL reservation successfully added”
OFSSourceId
OFSSourceId T24 OFS.SOURCE record used by this connection
HostIP  Comma separate list of jAgent instance. Syntax: <host>-<port>,<host>-<port>,…
LoadBalancing
LoadBalancing When enabled, T24ServiceConnector will create a connection pool with evenly allocated connections among the list
of available servers. If disabled then only High availability is ensured.
High availability - T24ServiceConnector will attempt to access the first mentioned Jagent host details and will create connection
pool, based on the configuration settings while the first request is initiated. While the Jagent connected goes down for an unavailable state,
then the request is routed to the next available Jagent configured. Based on the Retry count configured the retry attempts are done.
Note:
Note High availability of the Web service deployed in IIS is to be achieved by the user having the mechanisms available in the market.
Charset
Charset Character set configured in T24 (e.g. UTF-8, ISO-8859-1, etc.)
MaxPool
MaxPool The max. number of jAgent connections to spawn.
MinPool
MinPool The min. number of jAgent connections to spawn. This option will pre-fill the pool.
IdleTimeout
IdleTimeout Timeout (in milliseconds) after which an idle jAgent connection is released to the pool.
IncrementFactor
IncrementFactor Increment factor used when spawning new jAgent connections.
ActionTimeout
ActionTimeout Timeout (in seconds) after which jAgent will terminate a connection that has not processed a request in the specified
number of seconds.
RetryInterval
RetryInterval Wait interval (in milliseconds) before re-connecting after a second connection failure.
RetryAttempts
RetryAttempts No. of reconnection attempts
SSL
SSL Indicates whether to enable SSL encryption between T24ServiceConnector and jAgent.
DN
DN Specifies the SSL certificate’s distinguished name. Only used when enabling SSL.
Compression
Compression Indicates whether to enable data compression between T24ServiceConnector and jAgent.
CompressionThreshold  Specifies the minimum size (in bytes) for data packets to be compressed.
AllowInput Indicates whether to allow users to enter data on the console output when requested by T24 (e.g. due to T24 input request,
JBC debugger prompt, etc.)
EnvironmentVariables
EnvironmentVariables Semicolon separated list of additional environment variables to be applied to a jAgent connection (e.g..MYVAR1=AA;
MYVAR2;BB)
AgentUser  jAgent user to use when jAgent is started in user authentication mode.
AgentPassword jAgent password to use when jAgent is started in user authentication mode.

Page 28
Size of connection pool
Each application server will have its own mechanism for configuring the size of the connection pool. Irrespective of the application server
you choose you should decide how many connections will be required to service your requirements. Generally a good starting point is to
use the following calculation:

Connection pool size = 2.5 * number of COREs

For example, my laptop has one CPU and this CPU has two cores.
Cx = 2.5 * 2 ; therefore my machine would perform optimally with a max connections of 5

WCF service throttling


The WCF service throttling feature enables us to limit the number of concurrent WCF connections. We recommend setting the
maxConcurrentCalls attribute to the same value as the T24 Service Connector’s MaxPool property.

Additional WCF settings


The following properties enable users to configure additional WCF settings as e.g. the maximum message size, etc. Please refer to the .NET
Windows Communication Framework documentation for further details about these properties.

Page 29
Creating multiple T24 Service connectors to service multiple OFS.SOURCE
There are system scenarios which require different requests to be processed by different T24 instances, possibly configured with different
OFS.SOURCE entries. The following Connectors.xml configuration file defines two T24 Service connectors pointing to two jAgent instances
configured to use different OFS.SOURCE settings. Assuming two TWS (Web services) are configured (in web.config of TWS) with respective
T24ServiceConnector Id and Url.
<ServiceConnectorConf>
<ServiceConnector>
<Id>T24ServiceConnector</Id>
<URL>http://localhost:6060/ServiceConnectorT24</URL>
<OFSSourceId>GCS</OFSSourceId>
<HostIP>127.0.0.1-20002</HostIP>
<LoadBalancing>true</LoadBalancing>
<Charset>UTF-8</Charset>
<MaxPool>40</MaxPool>
<MinPool>1</MinPool>
<IdleTimeout>300000</IdleTimeout>
<IncrementFactor>2</IncrementFactor>
<ActionTimeout>90</ActionTimeout>
<RetryInterval>2000</RetryInterval>
<RetryAttempts>30</RetryAttempts>
<SSL>false</SSL>
<DN>TEMENOS</DN>
<Compression>true</Compression>
<CompressionThreshold>2048</CompressionThreshold>
<AllowInput>false</AllowInput>
<EnvironmentVariables></EnvironmentVariables>
<AgentUser>myuser</AgentUser>
<AgentPassword>mypwd</AgentPassword>
</ServiceConnector>
<ServiceConnector>
<Id>T24ServiceConnectorUAT</Id>
<URL>http://localhost:6061/ServiceConnectorT24</URL>
<OFSSourceId>UAT</OFSSourceId>
<HostIP>127.0.0.1-20002</HostIP>
<LoadBalancing>true</LoadBalancing>
<Charset>UTF-8</Charset>
<MaxPool>40</MaxPool>
<MinPool>1</MinPool>
<IdleTimeout>300000</IdleTimeout>
<IncrementFactor>2</IncrementFactor>
<ActionTimeout>90</ActionTimeout>
<RetryInterval>2000</RetryInterval>
<RetryAttempts>30</RetryAttempts>
<SSL>false</SSL>
<DN>TEMENOS</DN>
<Compression>true</Compression>
<CompressionThreshold>2048</CompressionThreshold>
<AllowInput>false</AllowInput>
<EnvironmentVariables></EnvironmentVariables>
<AgentUser>myuser</AgentUser>
<AgentPassword>mypwd</AgentPassword>
</ServiceConnector></ServiceConnectorConf>

Page 30
TWS
TWS has two files for app settings configuration,
• devenv.config – Used for the configuration purpose of TWS composer (C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE\ devenv.config)
• web.config –used for Web service configuration (Under the TWS project created)

The devenv.config has the app settings region as in the image below.

The web.config in TWS project has the app settings region as in the image below.

ConnectorServiceID:
ConnectorServiceID The Service connector instance (unique) ID configured in the configuration file (connectors.xml) of
T24ServiceConnector
ConnectorServiceURL:
ConnectorServiceURL: The respective url configured in the configuration file (connectors.xml) of T24SeriveConnector
Note: App settings /Configuration parameter values supplied by default are only for indicative purpose, which has to be modified
based on the environment where executed.

Service Throttling Co
Configuration

Page 31
Resources...
 Security: http://msdn.microsoft.com/en-us/library/ms732362.aspx
 Programming WCF Security :http://msdn.microsoft.com/en-us/library/ms731925.aspx
 OpenSSL: http://www.openssl.org/
 Enterprise Library 4.0 (May2008): http://msdn.microsoft.com/en-us/library/cc512464.aspx

Page 32

You might also like