Internal Struct Type Support
A char[] variable declared in the struct type can be converted even if it corresponds to a different type in the service information file.
When sdl and the information file are configured as follows, conversion can be made.
Configure sdl as follows:
struct qmc_rq{
char value1[4];
/* struct depth1 */
char value2[4];
/* struct depth2 */
char value3[4];
char value4[4];
/* end depth2 */
char value5[4];
/* end depth1 */
char value6[4];
};
struct qmc_rps{
char value1[4];
/* struct r_depth1 */
char value2[4];
char value3[4];
/* end r_depth1 */
char value4[4];
};
struct LANG_POLICI01 {
char Xid_length[2];
char Xid[255];
char customerId_length[2];
char customerId[255];
char userId_num[4];
char userId_cont[16];
char loopback;
char freeFormAddress_num[4];
char freeFormAddress_cont[16];
char policyType_num[4];
char policyType_cont[16];
};
struct LANG_POLICO01 {
char Xid_length[2];
char Xid[255];
char customerId_length[2];
char customerId[255];
char Notification_num[4];
char Notification_cont[16];
char standardisedAddressAnd_num[4];
char standardisedAddressAnd_cont[16];
Configure the service information file as follows:
STRUCT
name = depth1
TYPE
name = value1
type = int
name = value2
type = struct
subtype = depth2
name = value3
type = int
STRUCT
name = depth2
TYPE
name = value1
type = int
name = value2
type = int
STRUCT
name = r_depth1
TYPE
name = value1
type = int
name = value3
type = int
SERVICE
name = TEST_STRUCT
tmaxname = TEST_STRUCT
intype = STRUCT
outtype = STRUCT
instruct = qmc_rq
outstruct = qmc_rps
REQUEST
name = value1
type = int
name = value2
type = struct
subtype = depth1
name = value3
type = int
RESPONSE
name = value1
type = int
name = value2
type = struct
subtype = r_depth1
name = value3
type = int
SERVICE
name = TOUPPER
tmaxname = TOUPPER
intype = STRING
outtype = STRING
REQUEST
name = req
type = string
restriction = maxLength="19"
RESPONSE
name = result
type = string
restriction = maxLength="19"
SERVICE
name = TOUPPERSDL1
tmaxname = TOUPPERSDL1
intype = STRUCT
outtype = STRUCT
instruct = wsgw_s
outstruct = wsgw_s
REQUEST
name = req
type = string
name = intvalue
type = int
name = shortvalue
type = short
name = floatvalue
type = float
name = doublevalue
type = double
name = charvalue
type = char
RESPONSE
name = result
type = string
name = intvalue
type = int
name = shortvalue
type = short
name = floatvalue
type = float
name = doublevalue
type = double
name = charvalue
type = char
SERVICE
name = TOUPPERSDL
tmaxname = TOUPPERSDL
intype = STRUCT
outtype = STRUCT
instruct = kstrdata
outstruct = kstrdata
REQUEST
name = len
type = int
name = str
type = string
RESPONSE
name = len
type = int
name = str
type = string
STRUCT
name = requestHeaderI
TYPE
name = Xid-length
type = short
name = Xid
type = string
name = customerId-length
type = short
name = customerId
type = string
name = userId-num
type = int
name = userId-cont
type = string
name = loopback
type = char
STRUCT
name = GetStandardisedAddressAndTerI
TYPE
name = requestHeader
type = struct
subtype = requestHeaderI
name = freeFormAddress-num
type = int
name = freeFormAddress-cont
type = string
name = policyType-num
type = int
name = policyType-cont
type = string