// Build up a simple RowSet object representing the input dynamic TEMP-TABLE.
RowSet rsIn = new RowSet( ); // Create the MetaData, consisting of String and Integer columns ColumnMetaData[] schema = new ColumnMetaData[2]; ColumnMetaData firstCol = new ColumnMetaData("Name", ColumnMetaData.CHAR_TYPE, 0); ColumnMetaData secondCol = new ColumnMetaData("Number", ColumnMetaData.INT_TYPE, 0); schema[0] = firstCol; schema[1] = secondCol; rsIn.setSchema(schema); // Create a data row and add to the RowSet Vector row; row = new Vector( ); row.addElement(new String("Sally Jones")); row.addElement(new Integer(1)); rsIn.addRow(row); // Convert the RowSet into a TableHandleParam Object, // the input parameter for DynTT.p // Get the RowSet as a DOM Element. This element has two // children, a <schema> element and a <Data> element Element dataSetIn = rsIn.getDataSetAsDom( ); // Create a MessageElement containing the DataSet MessageElement dataSetMsgEl = new MessageElement(dataSetIn); // Place the DataSet MessageElement into the message element array // and create the TableHandleParam object MessageElement msgArrayIn[] = new MessageElement[1]; msgArrayIn[0] = dataSetMsgEl; // Create the TableHandleParam object, ttHandle, representing the // dynamic TABLE-HANDLE parameter TableHandleParam ttHandle = new TableHandleParam( ); ttHandle .set_any(msgArrayIn); ... |