title: Fetching Output Parameters from a stored procedure using Eclipse link
body: <p>I am calling a stored procedure from JPA EclipseLink. Stored Procedure returns three output variables, One cursor type and other two types. I am able to get the value returned from cursor but not the other two values.</p>
  
  <p>Here is the part of stored procedure(example):</p>
  
  <pre><code>create or replace PROCEDURE PROCEDURE1 (
  Variable1               IN VARCHAR2,
  Variable12          IN VARCHAR2,
  Variable13                      IN VARCHAR2,
  Variable14                  IN VARCHAR2,
  p_xml_result                OUT SYS_REFCURSOR,
  p_errorcode             OUT NUMBER,
  p_errorMessage      OUT VARCHAR2)
      IS
          -- Declare variable
          ERRSQL                         VARCHAR2 (80);
          NOSTRAECCEZIONE    EXCEPTION;
          ERROR_ONE                 EXCEPTION;
          V_AREA                        VARCHAR2(40);
  
      BEGIN
  SELECT AREA
                INTO V_AREA
                FROM Employee
               WHERE     Employee_CODE = P_EmployeeCode;
  
                OPEN p_xml_result FOR
                &lt;Some query to get data&gt;
                p_errorcode := 0;
                  p_errorMessage := NULL;
  
  EXCEPTION
          WHEN NO_DATA_FOUND THEN
                  p_errorcode := 100;
              p_errorMessage := 'generic error';
  
          WHEN OTHERS THEN
              p_errorcode := 102;
              p_errorMessage := SQLERRM;
  </code></pre>
  
  <p>Java Code: </p>
  
  <pre><code>StoredProcedureCall procCall = new StoredProcedureCall();
  procCall.setProcedureName("getSpecialOffers");
  procCall.addNamedArgument("Variable1","Variable1",String.class);
  procCall.addNamedArgument("Variable2", "Variable12", String.class);
  procCall.addNamedArgument("Variable13", "Variable13", String.class);
  
  procCall.addNamedArgument("Variable14", "Variable14", String.class);
  procCall.addNamedOutputArgument("p_xml_result", "p_xml_result", OracleTypes.CURSOR);
  procCall.addNamedOutputArgument("p_errorcode", "p_errorcode", Integer.class);
  procCall.addNamedOutputArgument("p_errorMessage", "p_errorMessage", String.class);
  
  Session session = ((JpaEntityManager)_em).getActiveSession();
  ValueReadQuery query = new ValueReadQuery();
  query.setCall(procCall);
  query.addArgument("Variable1");
  query.addArgument("Variable12");
  query.addArgument("Variable13");
  query.addArgument("Variable14");
  
  Vector parameters = new Vector();
  parameters.addElement(Variable1);
  parameters.addElement(Variable12);
  parameters.addElement(Variable13);
  parameters.addElement(Variable14);
  
  
  Object qResult = null;
  
  qResult = session.executeQuery(query,parameters);
  Vector vec=(Vector) qResult;
  ArrayRecord arrayrec =(ArrayRecord) vec.get(0);
  </code></pre>
  
  <p>p_xml_result returns four field, which I am able to fetch as arrayrec.get("VariableXYZ"). and arrayrec also has only those four variables present which are returned from cursor. But I want to access the value of p_errorcode in my code in all the conditions. Can you please help me with it?</p>