Need help on calling stored procedure from ibatis

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Need help on calling stored procedure from ibatis

prabu p
                As I am new to ibatis, I need your help on calling stored procedure from ibatis.

Here is the code I am trying to call stored procedure, but it is not working.

Stored procedure as follows:-

getRadiusData( rc  OUT SYS_REFCURSOR,ArgFromDate in varchar2,ArgEndDate in varchar2,
rptType VARCHAR2,timeRange VARCHAR2, authStatus  VARCHAR2,userName VARCHAR2,identityGroup VARCHAR2 ,
netwokDeviceGroup  VARCHAR2 ,netwokDevicename  VARCHAR2 ,accessService  VARCHAR2 ,identityStore  VARCHAR2 ,
acsInstance  VARCHAR2,Failure_Reason  VARCHAR2,Calling_Station_ID  VARCHAR2,Device_IP_Address  VARCHAR2,
Audit_Session_ID VARCHAR2,ACS_Session_ID VARCHAR2, Acct_Session_ID VARCHAR2,isMab VARCHAR2,adDomain VARCHAR2,
CTS_Security_Group VARCHAR2,  Show_SGT_Assign VARCHAR2, Show_SGT_Environment VARCHAR2,ID number ,
isDrillDown number)

XDEQueriesMap.xml file has entry as follows:-

    <procedure id="getRadiusData" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
          {call getRadiusData(?, #FromDate#, #ToDate#,
#AuthenticationStatus#, #TimeRange#, 'All', #UserName#, 'All', 'All', 'All', 'All', 'All', 'All', #FailureReason#,
#CallStationID#, #DeviceIP#, #AuditSessionID#, 'All', 'All', 'All', 'All', 'All', 'All','All','1', '0')}

From java file I am calling the procedure getRadiusData as follows:-

                                hashMap.put(QUERY_USERNAME, userName);
                                hashMap.put(CALL_STATION_ID, stationID);
                                hashMap.put(QUERY_AUDIT_SESSION_ID, auditSessionID);                          
                                hashMap.put(DEVICE_IP, deviceIP);
                                hashMap.put(QUERY_NAS_PORT, nasPort);
                                hashMap.put(AUTHEN_STATUS, authStatus);
                                hashMap.put(QUERY_FAILURE_REASON, failureReason);
                                hashMap.put(FROM_DATE, fromDate);
                                hashMap.put(TO_DATE, toDate);
                                hashMap.put(TIME_RANGE, timeRange);
                                hashMap.put(TOP_N, topNRecords);

List<HashMap> list = xdeDAO.callContentSearch("getRadiusData", hashMap);

In the procedure we are using “SYS_REFCURSOR”. I am not sure how to pass parameter for “SYS_REFCURSOR” to the stored procedure from ibatis.
Reply | Threaded
Open this post in threaded view

Re: Need help on calling stored procedure from ibatis

Larry Meadors
The ibatis project has moved and been renamed.

It is no longer being maintained as an Apache project, but has moved
(along with the development team) here:

Please join us at the new location by joining the mailing list here:

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]