svn commit: r1758779 - in /ofbiz/trunk: applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java

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

svn commit: r1758779 - in /ofbiz/trunk: applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java

jleroux@apache.org
Author: jleroux
Date: Thu Sep  1 14:16:34 2016
New Revision: 1758779

URL: http://svn.apache.org/viewvc?rev=1758779&view=rev
Log:
Reverts changes which slipped in inadvertently, thanks to Jacopo on dev ML DhlServices.java

Modified:
    ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
    ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java

Modified: ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java?rev=1758779&r1=1758778&r2=1758779&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java (original)
+++ ofbiz/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/dhl/DhlServices.java Thu Sep  1 14:16:34 2016
@@ -809,9 +809,20 @@ public class DhlServices {
             return handleDhlShipmentConfirmResponse(responseString, shipmentRouteSegment, shipmentPackageRouteSegs, locale);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
-            return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
-                    "FacilityShipmentFedexRateTemplateReadingError",
-                    UtilMisc.toMap("errorString", e.toString()), locale));
+            if (shipmentConfirmResponseString != null) {
+                Debug.logError("Got XML ShipmentConfirmRespose: " + shipmentConfirmResponseString, module);
+                return ServiceUtil.returnError(UtilMisc.toList(
+                        UtilProperties.getMessage(resourceError,
+                                "FacilityShipmentFedexRateTemplateReadingError",
+                                UtilMisc.toMap("errorString", e.toString()), locale),
+                        UtilProperties.getMessage(resourceError,
+                                "FacilityShipmentFedexShipmentConfirmResponse",
+                                UtilMisc.toMap("shipmentConfirmResponseString", shipmentConfirmResponseString), locale)));
+            } else {
+                return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
+                        "FacilityShipmentFedexRateTemplateReadingError",
+                        UtilMisc.toMap("errorString", e.toString()), locale));
+            }
         } catch (GenericServiceException e) {
             Debug.logError(e, module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,

Modified: ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java?rev=1758779&r1=1758778&r2=1758779&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java Thu Sep  1 14:16:34 2016
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.io.Reader;
 import java.io.StringReader;
 import java.io.StringWriter;
-import java.net.URLEncoder;
 import java.rmi.server.UID;
 import java.sql.Timestamp;
 import java.util.HashSet;
@@ -2867,7 +2866,6 @@ public final class MacroFormRenderer imp
             String newQueryString = sb.toString();
             String urlPath = UtilHttp.removeQueryStringFromTarget(paginateTarget);
             linkUrl = rh.makeLink(this.request, this.response, urlPath.concat(newQueryString));
-            linkUrl = URLEncoder.encode(linkUrl, "UTF-8");
         }
         StringWriter sr = new StringWriter();
         sr.append("<@renderSortField ");
@@ -2875,7 +2873,7 @@ public final class MacroFormRenderer imp
         sr.append(sortFieldStyle);
         sr.append("\" title=\"");
         sr.append(titleText);
-        sr.append("\" linkUrl=r\"");
+        sr.append("\" linkUrl=\"");
         sr.append(linkUrl);
         sr.append("\" ajaxEnabled=");
         sr.append(Boolean.toString(ajaxEnabled));