cancel
Showing results for 
Search instead for 
Did you mean: 

Update Adapter Specific Table Attributes

Former Member
0 Kudos

All,

This is how my excel contains the Adapter Specific Table Attributes. Can someone pls guide on how to read these values and update the communication channel.

cell 1 contains -> ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamName</ParamName><ParamValue>poolWaitingTime</ParamValue>
cell 2 contains ->ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamValue</ParamName><ParamValue>60000</ParamValue>
cell 3 contains ->ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamName</ParamName><ParamValue>driver:lockTimeout</ParamValue>
cell 4 contains ->ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamValue</ParamName><ParamValue>120000</ParamValue>
cell 5 contains ->ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamName</ParamName><ParamValue>Statement.setQueryTimeout</ParamValue>
cell 6 contains ->ASTA:<Name>addParameterParams</Name><ParamName>addParameterParamValue</ParamName><ParamValue>180000</ParamValue>

Here is the code to read and update the data:

int propTabRowCount = 0;
int propTabRowCellCount = 0;
while (row.getCell(c) != null && row.getCell(c).getStringCellValue().startsWith("ASTA:<Name>"))
{
int pos1 = row.getCell(c).getStringCellValue().indexOf("ASTA:<Name>");
pos1 = pos1 + "ASTA:<Name>".length();

int pos2 = row.getCell(c).getStringCellValue().indexOf("</Name><ParamName>");
int pos3 = row.getCell(c).getStringCellValue().indexOf("</ParamName><ParamValue>");
int pos4 = row.getCell(c).getStringCellValue().indexOf("</ParamValue>");

propTabRowCell.setColumnName(row.getCell(c).getStringCellValue().substring(pos2 + "</Name><ParamName>".length(), pos3));
propTabRowCell.setValue(row.getCell(c).getStringCellValue().substring(pos3 + "</ParamName><ParamValue>".length(), pos4));
propTabRowCells.add(propTabRowCell);

propTabRow.getValueTableCell().add(propTabRowCells.get(propTabRowCellCount));
propTabRows.add(propTabRow);

propTab.setName("addParameterParams");
propTab.getValueTableRow().add(propTabRows.get(propTabRowCount));
propTabs.add(propTab);

propTabRowCell = new GenericTableRowTableCellType();
propTabRow = new GenericTableRowType();
propTab = new GenericPropertyTableType();

propTabRowCellCount++;
propTabRowCount++;
c++;

}
channel.getAdapterSpecificTableAttribute().addAll(propTabs);

When I execute this code I get the following error:1 Column(s) Transferred for Table 'addParameterParams' Although Table Has 2 Column(s)

Please advice.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Any inputs?