1 Reply Latest reply on Aug 31, 2011 6:30 AM by Edward Isakov

    Use IBATIS to call stored procedure

    Edward Isakov Newbie

      I call stored procedure from IBATIS (Oracle stored procedure).

       

      CREATE OR REPLACE PROCEDURE BSOUSER.GET_FOR_SAP(

      BSO_NUMB      VARCHAR2,

      sellDepName   OUT VARCHAR2, 

      sellDepCode   OUT VARCHAR2,

      BSOStatusCode OUT VARCHAR2,

      BSOStatusText OUT VARCHAR2,

      policyBSO     OUT VARCHAR2)

       

      Query configured like that

       

      ();

                   mp.put("BSO_NUMB", "...");

                ...

       

                   exchange.getIn().setBody(mp);

                       

                       

                       

                 }

                 

                 })

                 .to("ibatis:GET_FOR_SAP?statementType=QueryForList");

       

      But procedureThe does not return (the body not contain result):

       

      12:33:31,942 | WARN  | foo              | sap-model_ib2                    | 68 - org.apache.camel.camel-core - 2.6.0.fuse-01-15 | Exchange[

      , Id:ID-1-1814-2612-1314774544110-6-2

      , ExchangePattern:InOnly

      , Properties:{CamelToEndpoint=log://sap-model_ib2?level=WARN&multiline=true&showAll=true ...}

      , Headers:{CamelIBatisStatementName=GET_FOR_SAP, firedTime=Wed Aug 31 12:33:30 MSD 2011, CamelIBatisResult=[]}

      , BodyType:java.util.ArrayList

      , Body:[]

      , Out: null]

       

      I use ibatis-sqlmap-2.3.4.726

      How can I configure IBATIS to call stored procedure?

       

      Edited by: isakoves on Aug 31, 2011 9:17 AM

        • 1. Re: Use IBATIS to call stored procedure
          Edward Isakov Newbie

          It works in that combination:

           

           

           

          public class BSOInput implements Serializable {

               private static final long serialVersionUID = 1L;

           

               public String BSO_NUMB;

               public String sellDepName;

               public String sellDepCode;

               public String BSOStatusCode;

               public String BSOStatusText;

               public String policyBSO;

          }

           

           

          .to("ibatis:GET_FOR_SAP?statementType=Update")