hello jkrier... Thanks to Nastya, this topic was surfaced to near the top of the list so i noticed it. I don't know if the following groovy code might help or not, but i have successfully called an oracle package stored procedure through groovy script step...
Regards,
Todd
// jdbc:oracle:thin:rwmb/PASS_VALUE@yourserver.business.com:1577:w043
// RWM.RWMB_APP_PKG.GET_BUS_SUBJECT_AREA_ALL_SP(?, <%=AplycnSysId%>, '<%=RetroDate%>')
import java.sql.*;
import groovy.sql.Sql;
import oracle.jdbc.driver.OracleTypes;
import groovy.xml.MarkupBuilder;
def protocol = 'jdbc:oracle:thin:';
def props = new Properties();
props.put('user', 'someuser');
props.put('password', 'somepassword');
def connectStr = "${protocol}@yourserver.business.com:1577:w043";
log.info "connectStr=" + connectStr;
def sqlOracle = Sql.newInstance(connectStr, props);
def sysId = 9018;
def retroDt = 'CURR';
//PROCEDURE GET_BUS_SUBJECT_AREA_ALL_SP ( p_handle_inout IN OUT RetData, p_aplycn_sys_id_in IN Number, p_retro_date_in IN Varchar2 );
def outList = [];
def eachVal = '';
MarkupBuilder xml;
xml = new MarkupBuilder(new PrintWriter(new File('c:\\temp\\markupbuilder' + testRunner.testCase.name + '.xml')));
//sqlOracle.call("begin RWM.RWMB_APP_PKG.GET_BUS_SUBJECT_AREA_ALL_SP(${Sql.resultSet OracleTypes.CURSOR}, ${sysId},${retroDt}); end;") {rset ->
sqlOracle.call("begin RWM.RWMB_APP_PKG.GET_BUS_SUBJECT_AREA_ALL_SP(${Sql.resultSet(-10)}, ${sysId},${retroDt}); end;") {rset ->
ResultSetMetaData rsmd = rset.getMetaData();
rsmd.eachWithIndex { rs, indx ->
log.info '====================' + rsmd.getColumnName(indx + 1);
};
// rset.eachRow(){
// log.info it.getAt(1) + '|1|' + it.getAt(2) + '|2|' + it.getAt(3) + '|3|' + it.getAt(4) + '|4|' + it.getAt(5) + '|5|' + it.getAt(6) + '|6|' + it.getAt(7) + '|7|' + it.getAt(8);
//// log.info it.getString("BUS_AREA_NAME");
// };
// rset.eachRow(){
// log.info '-------------------' + it.getAt(1) + '|1|' + it.getAt(2) + '|2|' + it.getAt(3) + '|3|' + it.getAt(4) + '|4|' + it.getAt(5) + '|5|' + it.getAt(6) + '|6|' + it.getAt(7) + '|7|' + it.getAt(8);
// };
xml.ROWSET {
rset.eachRow(){ row ->
ROW {
BUS_AREA_ID(row.BUS_AREA_ID);
BUS_AREA_NAME(row.BUS_AREA_NAME);
PARTY_ID(row.PARTY_ID);
DATA_OBJECT_ID(row.DATA_OBJECT_ID);
DATA_OBJECT_NAME(row.DATA_OBJECT_NAME);
DATA_OBJECT_BUS_NAME(row.DATA_OBJECT_BUS_NAME);
PERS_FST_NAME(row.PERS_FST_NAME);
PERS_MID_NAME(row.PERS_MID_NAME);
PERS_LST_NAME(row.PERS_LST_NAME);
};
};
};
};
log.info '';
log.info 'Test Step "' + testRunner.runContext.currentStep.name + '" done...';