Sei sulla pagina 1di 11

Webservices for T24 Data Access

WSDL for CBS Data Access :


http://debeshdg.ddns.net:8080/cbsAppAccess/services/cbsDataAccess?wsdl

Method Name : FileData

This method is used to return a single record in a table. In this example details of record 2005 is
extracted from table FBNK.SECTOR

Method Name : FileDict

/* This is a method to get the dictionary of a T24 file where


* the file name is passed as an argument. It reads the parmam.xml to get
* the IP address and port number of the T24 database to connect
* The 2nd Argument is the kind of data returned by the method
* these are the following types
* whole - complete dictionary is returned
* name - only the field names are returned
* type - field type is returned. Could be D or J or I
* length - length of the field with justification for eg. 16L - 16 characters left
justified
* val - Single Value or Multivalued.
* */
Method Name : FileReadwithFlds

<Does not work properly – Returns all field values instead of what is requested.>

Method Name : FileSelect

Returns all the records in a Table. In this example shown below it return all the records of the
FBNK.SECTOR table.
Method Name : FileSelecthdr - Same as FileSelect (don’t use)

Method Name : FileSelectwithFlds

Selects only certain selected fields . In this example values of fields


RISK.EXPO.TYPE,SHORT.NAME,DESCRIPTION is returned.
Method Name : FileSelectwithFldshdr (duplicate ,don’t use)

For Transaction update into T24 , a different webservice would be used.

The wsdl for webservice


http://debeshdg.ddns.net:8080/CBSmsgServices/services/OfsmsgProcess?wsdl. You can use this to setup
the SOAPUI.

I am putting the screenshots of SOAPUI that you can use .


In T24 there are 2 steps to create a record 1) is input 2) is authorise

Screenshot for Input

The request is in the following format

FUNDS.TRANSFER,AC/I/PROCESS,DEVELOP.1/123456/GB0010001,,TRANSACTION.TYPE::=AC,DEBI
T.ACCT.NO::=USD140650001,DEBIT.CURRENCY::=USD,CREDIT.ACCT.NO::=21288,CREDIT.AMOUNT
::=1350.00,CREDIT.CURRENCY::=USD,ORDERING.CUST::=100315,PAYMENT.DETAILS::='REFUND
OF PROCESS CHG'

The response that you will receive will be something like this

FT1110412Q4Y//1,TRANSACTION.TYPE:1:1=AC,DEBIT.ACCT.NO:1:1=USD140650001,CURRENCY.MK
T.DR:1:1=1,DEBIT.CURRENCY:1:1=USD,DEBIT.VALUE.DATE:1:1=20110414,CREDIT.ACCT.NO:1:1=21
288,CURRENCY.MKT.CR:1:1=1,CREDIT.CURRENCY:1:1=USD,CREDIT.AMOUNT:1:1=1350.00,CREDIT
.VALUE.DATE:1:1=20110414,PROCESSING.DATE:1:1=20110414,ORDERING.CUST:1:1=100315,PAYM
ENT.DETAILS:1:1='REFUND OF PROCESS
CHG',CHARGE.COM.DISPLAY:1:1=NO,COMMISSION.CODE:1:1=WAIVE,CHARGE.CODE:1:1=WAIVE,
RETURN.TO.DEPT:1:1=NO,FED.FUNDS:1:1=NO,POSITION.TYPE:1:1=TR,AMOUNT.DEBITED:1:1=USD
1350.00,AMOUNT.CREDITED:1:1=USD1350.00,CREDIT.COMP.CODE:1:1=GB0010001,DEBIT.COMP.C
ODE:1:1=GB0010001,LOC.AMT.DEBITED:1:1=1350.00,LOC.AMT.CREDITED:1:1=1350.00,CREDIT.CUS
TOMER:1:1=100277,DR.ADVICE.REQD.Y.N:1:1=N,CR.ADVICE.REQD.Y.N:1:1=N,CHARGED.CUSTOME
R:1:1=100277,TOT.REC.COMM:1:1=0,TOT.REC.COMM.LCL:1:1=0,TOT.REC.CHG:1:1=0,TOT.REC.CHG
.LCL:1:1=0,RATE.FIXING:1:1=NO,TOT.REC.CHG.CRCCY:1:1=0,TOT.SND.CHG.CRCCY:1:1=0,STMT.N
OS:1:1=VAL,RECORD.STATUS:1:1=INAU,CURR.NO:1:1=1,INPUTTER:1:1=7226_DEVELOP1__OFS_TA
G1,DATE.TIME:1:1=1607192045,CO.CODE:1:1=GB0010001,DEPT.CODE:1:1=74</ns:return>

here the FT1110412Q4Y is the transaction id. We need to use that in the authorisation step shown below.

Screenshot for authorising the transaction is

Again the request xml would be

FUNDS.TRANSFER,AC/A/PROCESS,DEVELOP.2/123456/GB0010001,FT1110412Q4Y
where you can see that last string is the transaction number

and the response that you receive is

FT1110412Q4Y//1,TRANSACTION.TYPE:1:1=AC,DEBIT.ACCT.NO:1:1=USD140650001,CURRENCY.MK
T.DR:1:1=1,DEBIT.CURRENCY:1:1=USD,DEBIT.VALUE.DATE:1:1=20110414,CREDIT.ACCT.NO:1:1=21
288,CURRENCY.MKT.CR:1:1=1,CREDIT.CURRENCY:1:1=USD,CREDIT.AMOUNT:1:1=1350.00,CREDIT
.VALUE.DATE:1:1=20110414,PROCESSING.DATE:1:1=20110414,ORDERING.CUST:1:1=100315,PAYM
ENT.DETAILS:1:1='REFUND OF PROCESS
CHG',COMMISSION.CODE:1:1=WAIVE,CHARGE.CODE:1:1=WAIVE,RETURN.TO.DEPT:1:1=NO,FED.F
UNDS:1:1=NO,POSITION.TYPE:1:1=TR,AMOUNT.DEBITED:1:1=USD1350.00,AMOUNT.CREDITED:1:1
=USD1350.00,CREDIT.COMP.CODE:1:1=GB0010001,DEBIT.COMP.CODE:1:1=GB0010001,LOC.AMT.D
EBITED:1:1=1350.00,LOC.AMT.CREDITED:1:1=1350.00,CREDIT.CUSTOMER:1:1=100277,DR.ADVICE.
REQD.Y.N:1:1=N,CR.ADVICE.REQD.Y.N:1:1=N,CHARGED.CUSTOMER:1:1=100277,TOT.REC.COMM:1
:1=0,TOT.REC.COMM.LCL:1:1=0,TOT.REC.CHG:1:1=0,TOT.REC.CHG.LCL:1:1=0,RATE.FIXING:1:1=NO
,TOT.REC.CHG.CRCCY:1:1=0,TOT.SND.CHG.CRCCY:1:1=0,AUTH.DATE:1:1=20110414,STMT.NOS:1:1
=177330282074933.00,STMT.NOS:2:1=1-
2,CURR.NO:1:1=1,INPUTTER:1:1=7226_DEVELOP1__OFS_TAG1,DATE.TIME:1:1=1607192049,AUTHO
RISER:1:1=2820_DEVELOP2_OFS_TAG1,CO.CODE:1:1=GB0010001,DEPT.CODE:1:1=74

Example 2: – With Debit Currency USD Credit Currency EUR

FUNDS.TRANSFER,UNIQ/I/PROCESS,DEVELOP.1/123456/GB0010001,,TRANSACTIO
N.TYPE::=AC,DEBIT.ACCT.NO::=USD140650001,DEBIT.CURRENCY::=USD,CREDIT.
ACCT.NO::=10561,CREDIT.AMOUNT::=1350.00,CREDIT.CURRENCY::=EUR,ORDERI
NG.CUST::=100315,PAYMENT.DETAILS::='REFUND OF PROCESS CHG'

(Calculates the Debit Amount using Buy/Sell Rate automatically)

Example 3: using Treasury Rate in different currency.

FUNDS.TRANSFER,UNIQ/I/PROCESS,DEVELOP.1/123456/GB0010001,,TRANSACTIO
N.TYPE::=AC,DEBIT.ACCT.NO::=USD140650001,TREASURY.RATE=1.32,DEBIT.CU
RRENCY::=USD,CREDIT.ACCT.NO::=10561,CREDIT.AMOUNT::=1350.00,CREDIT.C
URRENCY::=EUR,ORDERING.CUST::=100315,PAYMENT.DETAILS::='REFUND OF
PROCESS CHG'

DATA CAPTURE Message

DATA.CAPTURE,UNIQ/I/PROCESS,DEVELOP.1/123456/GB0010001,,SIGN::=D,AMOUNT.LCY::=23.56,
TRANSACTION.CODE::=1,ACCOUNT.NUMBER::=10561,ACCOUNT.OFFICER::=1,PRODUCT.CATEGO
RY::=6001

DATA.CAPTURE,RIMS/I/PROCESS,TRAIN.1/123456/GB0010001,,ACCOUNT.NUMBER::=
EUR150050001,SIGN::=D,AMOUNT.LCY::=1156.46,AMOUNT.FCY::=1000.60,EXCHANGE.RATE::=1.091
,TRANSACTION.CODE::=1,CURRENCY::=EUR

EUR150050001
Setup of Packages and classes

package com.ftl.service;

import T24FTLBridge.ofsMsgProc;
/**
* @author events
* This is a class specially used for OFS Message processing in
* T24 . It uses the ofsMsgProc class from T24FTLBridge package
* The basic parameters it accepts are ofs source which is of type telnet
* and the actual Ofs Message
*/
public class OfsmsgProcess {

public String helloName(String name){


return "Hello there " + name;

public String callofs(String Msg , String ofssrc)

{
ofsMsgProc gdata = new ofsMsgProc();
String retVal = gdata.readData( Msg,ofssrc);
System.out.println("*******Starting output ****** " );
System.out.println(retVal);
return(retVal);

}
Required jar files

T24CallRoutinewithParam.jar

Contents
Location of files: C:\Users\events\Documents\DEVELOPMENT\jbase_java_socket
communication\JAXWS\MARS\CBSAppAccess\src\t24FTLBridge\Endpoint\CBSAccess.java

package t24FTLBridge.Endpoint;

import T24FTLBridge.GetDict;
import T24FTLBridge.JXMLTable;
import T24FTLBridge.getDataRecord;
import T24FTLBridge.T24SelectList;
import T24FTLBridge.getDataRecbyFld;
import T24FTLBridge.getSingleDatabyFld;
import T24FTLBridge.ofsMsgProc;
import javax.jws.WebService;

@WebService
public class CBSAccess {
public String helloName(String name){
return "Hello there " + name;

@WebMethod
public String FileDict(String T24AppName, String returntype){

String Dictname = T24AppName;


GetDict getdict = new GetDict("2007", "localhost");

String dictReturn = getdict.readDict(Dictname, returntype);


return dictReturn;
}
@WebMethod
public String ReadIPPort(String Paramflname)
{
String portno="";
JXMLTable paramXML = new JXMLTable();
String flname = "config/" + Paramflname ;
String nodename = "T24loc";
try {
System.out.println("IP Address : " + paramXML.ReadXMLNode(flname , nodename , "ip"));
System.out.println("Port : " + paramXML.ReadXMLNode(flname , nodename , "port"));
portno = paramXML.ReadXMLNode(flname , nodename , "port");

} catch (Exception e) {
System.out.println("SQLException: " + e.getMessage());
}

return portno;
}
@WebMethod
public String FileData(String T24AppName, String recordID){
String Dataname = T24AppName;
getDataRecord getdata = new getDataRecord();

String dictReturn = getdata.readData(Dataname, recordID);


return dictReturn;
}

@WebMethod
public String FileSelect(String T24AppName)

{
String Dataname = T24AppName;
T24SelectList getdata = new T24SelectList();

String dictReturn = getdata.readList(Dataname);


return dictReturn;
}
@WebMethod
public String FileSelectwithFlds(String T24AppName, String FldName){
String Dataname = T24AppName;
getDataRecbyFld getdata = new getDataRecbyFld();

String dataReturn = getdata.readList(Dataname, FldName) ;


return dataReturn;
}

@WebMethod
public String FileSelectwithFldshdr(String T24AppName, String FldName){
String delims = "[.]+" ;
String[] splitArray = T24AppName.split(delims);
String fp = splitArray[0];
int lenfp = fp.length();

String Dictname = T24AppName.substring(lenfp+1);


String returntype = "name";
GetDict getdict = new GetDict("2007", "localhost");

String dictReturn1 = getdict.readDict(Dictname, returntype);

String Dataname = T24AppName;


getDataRecbyFld getdata = new getDataRecbyFld();

String dataReturn = getdata.readList(Dataname, FldName) ;


return dictReturn1 + "\n" + dataReturn;

@WebMethod
public String FileReadwithFlds(String T24AppName, String FldName, String recID){
String Dataname = T24AppName;
getSingleDatabyFld getdata = new getSingleDatabyFld();

String dataReturn = getdata.readList(Dataname, FldName , recID) ;


return dataReturn;
}
@WebMethod
public String FileSelecthdr(String T24AppName)

{
String delims = "[.]+" ;
String[] splitArray = T24AppName.split(delims);
String fp = splitArray[0];
int lenfp = fp.length();

String Dictname = T24AppName.substring(lenfp+1);


String returntype = "name";
GetDict getdict = new GetDict("2007", "localhost");

String dictReturn1 = getdict.readDict(Dictname, returntype);

String Dataname = T24AppName;


T24SelectList getdata = new T24SelectList();

String dictReturn = getdata.readList(Dataname);


return dictReturn1 + "\n" + dictReturn;
}

@WebMethod
public String callofs(String Msg , String ofssrc)

{
ofsMsgProc gdata = new ofsMsgProc();
String retVal = gdata.readData( Msg,ofssrc);
System.out.println("*******Starting output ****** " );
System.out.println(retVal);
return(retVal);

Potrebbero piacerti anche