svn commit: r547356 - /ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r547356 - /ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java

sichen
Author: sichen
Date: Thu Jun 14 11:50:54 2007
New Revision: 547356

URL: http://svn.apache.org/viewvc?view=rev&rev=547356
Log:
Changed returnError to returnFailure in UPS rate inquire services, so failing to get a UPS rate doesn't crash your whole checkout process

Modified:
    ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java

Modified: ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?view=diff&rev=547356&r1=547355&r2=547356
==============================================================================
--- ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/branches/release4.0/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Thu Jun 14 11:50:54 2007
@@ -1710,7 +1710,7 @@
             return resp;
         } else {
             errorList.add("Error status code : " + responseStatusCode);
-            return ServiceUtil.returnError(errorList);
+            return ServiceUtil.returnFailure(errorList);
         }
     }
 
@@ -2028,7 +2028,7 @@
         } catch (IOException e) {
             String ioeErrMsg = "Error writing the RatingServiceSelectionRequest XML Document to a String: " + e.toString();
             Debug.logError(e, ioeErrMsg, module);
-            return ServiceUtil.returnError(ioeErrMsg);
+            return ServiceUtil.returnFailure(ioeErrMsg);
         }
         
         // create AccessRequest XML doc
@@ -2039,7 +2039,7 @@
         } catch (IOException e) {
             String ioeErrMsg = "Error writing the AccessRequest XML Document to a String: " + e.toString();
             Debug.logError(e, ioeErrMsg, module);
-            return ServiceUtil.returnError(ioeErrMsg);
+            return ServiceUtil.returnFailure(ioeErrMsg);
         }
 
         // prepare the access/inquire request string
@@ -2054,7 +2054,7 @@
         } catch (UpsConnectException e) {
             String uceErrMsg = "Error sending UPS request for UPS Service Rate: " + e.toString();
             Debug.logError(e, uceErrMsg, module);
-            return ServiceUtil.returnError(uceErrMsg);
+            return ServiceUtil.returnFailure(uceErrMsg);
         }
         Debug.logInfo(rateResponseString, module);      
         Document rateResponseDocument = null;
@@ -2063,15 +2063,15 @@
         } catch (SAXException e2) {
             String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString();
             Debug.logError(e2, excErrMsg, module);
-            return ServiceUtil.returnError(excErrMsg);
+            return ServiceUtil.returnFailure(excErrMsg);
         } catch (ParserConfigurationException e2) {
             String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString();
             Debug.logError(e2, excErrMsg, module);
-            return ServiceUtil.returnError(excErrMsg);
+            return ServiceUtil.returnFailure(excErrMsg);
         } catch (IOException e2) {
             String excErrMsg = "Error parsing the RatingServiceSelectionResponse: " + e2.toString();
             Debug.logError(e2, excErrMsg, module);
-            return ServiceUtil.returnError(excErrMsg);
+            return ServiceUtil.returnFailure(excErrMsg);
         }        
         return handleUpsRateInquireResponse(rateResponseDocument);