hi,
   see firstly u have 5 input parameters and 1 output parameter so so number of '?' should be 6 not 5

and u have to call ur stored procedure as
{call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?, ?)}

Robert Campbell <[EMAIL PROTECTED]> wrote:
I'm trying to call a stored procedure. I pass it an object, it returns an object of the same type. Except it doesn't work.

    <parameterMap id="addParam" class="flubWall">
         <parameter property="flubId" jdbcType="NUMBER" javaType=" java.lang.Integer" mode="IN"/>
        <parameter property="flubName" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
        <parameter property="id" jdbcType="NUMBER" javaType=" java.lang.Integer" mode="IN"/>
        <parameter property="wallId" jdbcType="NUMBER" javaType="java.lang.Integer" mode="IN"/>
        <parameter property="wallName" jdbcType="VARCHAR" javaType=" java.lang.String" mode="IN" />
    </parameterMap>


    <resultMap id="flubWallResult" class="flubWall">
        <result property="flubId" column="FLUB_ID"/>
        <result property="flubName" column="FLUB_NAME"/>
        <result property="id" column="FLUB_WALL_ID" />
        <result property="wallId" column="WALL_ID" />
        <result property="wallName" column="WALL_NAME"/>
    </resultMap>
   
   
    <procedure id="submitFlubWall"
        parameterMap="addParam"
        resultMap="flubWallResult">
        {call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)}
    </procedure> 


Now this doesn't work.. I would expect the call to return a ResultSet which gets mapped by the resultMap into a new flubWall object. This doesn't happen. So I tried this:

Added as first parameter listed in the parameterMap:
        <parameter property="output1" jdbcType="ORACLECURSOR" mode="OUT" />

Changed to:
        {? = call FLUB_PROTO.flub_wall_tst.submit_flub_wall (?, ?, ?, ?, ?)} 

This also doesn't work, I get this error as I expected:
       There is no READABLE property named 'output1' in class 'com.blah.flubWall'


So how to do it? I saw examples where an object is mapped to a Map, then the Map is passed to the paramterMap, but that doesn't seem right.. it's like rewriting what iBatis should be doing...




Here’s a new way to find what you're looking for - Yahoo! Answers

Reply via email to