Mid tier BackChannel servlet calls and parameters recorded by SilkPerformer


Before learning how to modify scripts recorded against Mid Tier applications, you must understand the basic Mid Tier architecture.

All communications between a client browser and the Mid Tierare done through a servlet called BackChannel. Servlets can accept parameters.

To create valid requests, follow the BackChannel servlet's API. The API is composed of interfaces used to transfer information other than web pages between web clients and web tiers.

Some of the interface names are similar to those in the AR SystemC API. For example, the GetTableEntryList interface is used to request entries in an AR Systemtable field.


GetTableEntryList : TableEntryListBase {
string table_server; // server containing the table field
string table_schema;// schema containing the table field
string table_vui_name;// view containing the table field
long table_field_id;// table field id
string server;// servers to query
string schema;// schemas to query
string app_name;// application context
long start_row;// start row
long num_rows;// number of rows
long [] sort_order;// column sort order
string qualification;// search qualification
long [] qual_field_ids;// list of field ids for the qualification
string [] qual_field_values;// list of field values for the qualification
int [] qual_field_types;// list of field types for the qualification \}

This interface specifies the requirements for using the GetTableEntryList BackChannel servlet call:

  • You must send the correct type of values in this order (top to bottom).
  • Nothing is optional.
  • You must specify the character length of each value sent through the servlet.

For example, a valid BackChannel servlet call looks similar to this:

229/GetTableEntryList/7/myServerName25/SRS:ServiceRequestConsole
7/enduser9/3015240007/myServerName
11/SRM:Request0/1/01/02/0/
77/1\2\4\1\1\1000000338\99\1717300\4\1\1\1000000337\99\1717300\4\4\1\7\2\2\6000\
11/1/7/171730015/1/10/12752-Test5/1/1/4

The first number (229) indicates the total length of the string after the first forward slash. The following table shows the breakdown of the rest of the string by the GetTableEntryList required parameters:

Servlet call by GetTableEntryList parameters

Parameter

String length and value (length/value)

Notes

string table_server

7/myServerName


string table_schema

25/SRS:ServiceRequestConsole


string table_vui_name

7/enduser


long table_field_id

9/301524000


string server

7/myServerName


string schema

11/SRM:Request


string app_name

0/

No value

long start_row

1/0


long num_rows

1/0


long[] sort_order

2/0/

Array of 0 items

string qualification

77/1\2\4\1\1\1000000338\99\1717300\4\1\1\\\
1000000337\99\1717300\4\4\1\7\2\2\6000\

Qualification includes backslashes

long[] qual_field_ids

11/1/7/1717300

Array of 1 item

string[] qual_field_values

15/1/10/12752-Test

Array of 1 item

int[] qual_field_types

5/1/1/4

Array of 1 item

When you record a script against an AR Systemapplication, SilkPerformer records the BackChannel servlet calls and their parameter values. Values such as username and server name can change, so you should put them in variables. The Silk Performer plug-in manages the string length of these values whenever they change.

If you select an AR Systemapplication when creating a project in SilkPerformer, SilkPerformer uses the plug-in to record HTTP requests whenever it encounters HTTP traffic referring to BackChannel servlet calls.

In SilkPerformer XML format, the GetTableEntryList call is human-readable:

ARSYS_BACKCHANNEL_055:

"param"    :=

"<?xml version='1.0'?>\r\n"

"<RemedyXml operation=\"GetTableEntryList\">\r\n"

"  <string name=\"table_server\">"+gsARServer+"</string>\r\n"

"  <string name=\"table_schema\">SRS:ServiceRequestConsole</string>\r\n"

"  <string name=\"table_vui_name\">enduser</string>\r\n"

"  <long name=\"table_field_id\">301524000</long>\r\n"

"  <string name=\"server\">"+gsARServer+"</string>\r\n"

"  <string name=\"schema\">SRM:Request</string>\r\n"

"  <string name=\"app_name\"></string>\r\n"

"  <long name=\"start_row\">0</long>\r\n"

"  <long name=\"num_rows\">0</long>\r\n"

"  <Array name=\"sort_order\"></Array>\r\n"

"  <string name=\"qualification\">1\\2\\4\\1\\1\\1000000338\\99\\1717300\\4\\1\"

"\1\\1000000337\\99\\1717300\\4\\4\\1\\7\\2\\2\\6000\\</string>\r\n"
" <Array name=\"qual_field_ids\">\r\n"
" <long>1717300</long>\r\n"
"</Array>\r\n"
"  <Array name=\"qual_field_values\">\r\n"
"<string>"+gsUsername+"</string>\r\n"
"  </Array>\r\n"
"  <Array name=\"qual_field_types\">\r\n"
"    <int>4</int>\r\n"
" </Array>\r\n"
"</RemedyXml>";

Before the request is sent to Mid Tier, SilkPerformer assembles the string with the correct string lengths. As a scripter, you provide only the values, not the string lengths. The Mid Tier response to a request generally has a basic format for each interface. For more information, see Advanced-scripting-techniques.

For more information on Mid TierBackChannel servlet, see the following blogs shared on BMC Communities:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*