Author: sumedha
Date: Wed Jan  2 01:04:22 2008
New Revision: 11737

Log:

Fixed problem with getting out parameters from callable statement

Modified:
   
trunk/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java

Modified: 
trunk/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java
==============================================================================
--- 
trunk/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java  
    (original)
+++ 
trunk/commons/data-services/src/main/java/org/wso2/ws/dataservice/DBUtils.java  
    Wed Jan  2 01:04:22 2008
@@ -78,7 +78,6 @@
 
 public class DBUtils {
        private static final Log log = LogFactory.getLog(DBUtils.class);
-
        private String configFilePath;
 
        public static OMNode toOM(Reader reader) throws XMLStreamException {
@@ -353,9 +352,10 @@
                                                                elementValue = 
(String) elementValues.get(resultSetFieldName);
                                                        }
                                                        
-                                           elementValue = 
setOutparameterValue(cs, query,
-                                                                       
resultSetFieldName);
-                                                       
+                                                       if(elementValue == 
null){
+                                                               //This could be 
a OUT parameter of a stored procedure
+                                                                       
elementValue = setOutparameterValue(cs, query,resultSetFieldName);              
                                                
+                                                       }
 
                                                        if (columnDefalut == 
null || columnDefalut.equals("element")) {
                                                                OMElement 
rowElement = fac.createOMElement(displayTagName, omNs);
@@ -1120,7 +1120,7 @@
 
        public static Connection createConnection(String serviceName,Config 
config) throws AxisFault {
                try{
-                       log.info("Creating database connection for 
"+serviceName);
+                       log.debug("Getting database connection for 
"+serviceName);
                        //Try to load the JDBC driver class. If class not found 
throw an error.
                        
Class.forName(config.getPropertyValue(DBConstants.DRIVER)).newInstance();
                        Connection conn = null;

_______________________________________________
Commons-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/commons-dev

Reply via email to