title: How do I write StoredProcedure sub-classes to call Oracle functions?
body: <p>I've written the following Spring JDBC API StoredProcedure sub-class:</p>
  
  <pre><code>class GetLdapPropertiesStoredProcedure extends StoredProcedure {
  
  protected GetLdapPropertiesStoredProcedure(JdbcTemplate jdbcTemplate) {
      super(jdbcTemplate, "get_ldap_properties");
      setFunction(true);
      declareParameter(new SqlReturnResultSet("rs", new ProductPropertiesMapper()));
      declareParameter(new SqlParameter("in_ldap_code", Types.VARCHAR));
      compile();
  }
  
  public Properties execute(String productCode) {
      HashMap input = new HashMap();
      input.put("in_ldap_code", productCode);
  
      Map results = execute(input);
  
      Collection&lt;Map.Entry&lt;Object,Object&gt;&gt; entries = (Collection&lt;Map.Entry&lt;Object,Object&gt;&gt;) results.get("rs");
      Properties properties = new Properties();
      properties.entrySet().addAll(entries);
      return properties;
  }
  
  }
  </code></pre>
  
  <p>Which calls the following Oracle function:</p>
  
  <pre><code>FUNCTION get_ldap_properties (
  in_ldap_code   IN VARCHAR2
  )
  RETURN rowset;
  </code></pre>
  
  <p>However, when I call the above I get the following Oracle exception:</p>
  
  <pre><code>java.sql.SQLException: ORA-06550: line 1, column 13:
  PLS-00306: wrong number or types of arguments in call to 'GET_LDAP_PROPERTIES'
  ORA-06550: line 1, column 7:
  PL/SQL: Statement ignored
  </code></pre>
  
  <p>Can anyone please see what I'm doing wrong?</p>