title: No results returned by SimpleJdbcCall that executes Oracle function returning a REF CURSOR
body: <p>Here is what I have:</p>
  
  <p><strong>Function Specification:</strong></p>
  
  <pre><code>FUNCTION GET_SOME_DATA RETURNS REF CURSOR 
  IN_LOOK_UP_PARAM VARCHAR2 IN
  </code></pre>
  
  <p><strong>Java Code Snippet:</strong></p>
  
  <pre><code>    SimpleJdbcCall call =
          new SimpleJdbcCall(jdbcTemplate)
              .withCatalogName(SP_PACKAGE_NAME)
              .withFunctionName("GET_SOME_DATA")
              .declareParameters(
                  new SqlOutParameter(
                      SP_OUT_PARAM_RESULTS, 
                      OracleTypes.CURSOR, 
                      HEADER_ROW_MAPPER))
              .declareParameters(new SqlParameter(SP_IN_PARAM, Types.VARCHAR))
              .withoutProcedureColumnMetaDataAccess()
              .withReturnValue()
              .returningResultSet(SP_OUT_PARAM_RESULTS, HEADER_ROW_MAPPER);
      call.setFunction(true);
      call.compile();
      Map&lt;String, Object&gt; resultMap = call.execute(
          new MapSqlParameterSource().addValue(SP_IN_PARAM, lookupId));
  </code></pre>
  
  <p>The row mapper method is not called resultMap contains the <code>SP_OUT_PARAM_RESULTS</code> key with value as null.</p>
  
  <p>When tried to debug this, at some point after procedure execution in Spring library code, the update count is returned as -1 and so the code path where row mapper is called, is skipped.</p>
  
  <p>Any idea what I might be doing incorrectly in any of the oracle function/Simple Jdbc call?</p>