diff --git a/src/main/java/org/gcube/portlets/user/bluecloud/DdasVreIntegration.java b/src/main/java/org/gcube/portlets/user/bluecloud/DdasVreIntegration.java index 4f32f7d..72ab4c5 100644 --- a/src/main/java/org/gcube/portlets/user/bluecloud/DdasVreIntegration.java +++ b/src/main/java/org/gcube/portlets/user/bluecloud/DdasVreIntegration.java @@ -10,7 +10,6 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.HttpURLConnection; -import java.net.MalformedURLException; import java.net.URL; import java.util.List; @@ -90,6 +89,11 @@ public class DdasVreIntegration extends MVCPortlet { GCubeUser currentUser = getCurrentUser(renderRequest); log.debug("current user is + " + currentUser.getUsername() + " sending request to conductor ..."); try { + + Integer userOrderNumber = brokerRequest.getAsJsonObject().get("orderNumber").getAsInt(); + String userOrderName = brokerRequest.getAsJsonObject().get("userOrderName").getAsString(); + renderRequest.setAttribute("orderData", userOrderName + ", order number " + userOrderNumber); //pass to the JSP + result = sendRequestToConductor(brokerRequest, currentUser, renderRequest); } catch (Exception e) { // TODO Auto-generated catch block @@ -176,13 +180,15 @@ public class DdasVreIntegration extends MVCPortlet { os.write(jsonString.getBytes("UTF-8")); os.flush(); os.close(); - + StringBuilder sb = new StringBuilder(); - int httpResultCode = connection.getResponseCode(); - log.trace("HTTP Response code: " + httpResultCode); - - log.trace("Reading response"); boolean ok = true; + int httpResultCode = -1; + try { + httpResultCode = connection.getResponseCode(); + log.trace("HTTP Response code: " + httpResultCode); + log.trace("Reading response"); + InputStreamReader isr = null; if (httpResultCode == HttpURLConnection.HTTP_OK) { isr = new InputStreamReader(connection.getInputStream(), "UTF-8"); @@ -197,6 +203,10 @@ public class DdasVreIntegration extends MVCPortlet { } br.close(); isr.close(); + } catch (java.net.SocketTimeoutException e) { + log.warn("Read timout may have occurred, however I think it went through anyways."); + return true; + } if (ok) { log.info("Post to Conductor is OK" + httpResultCode); log.trace("Response message from server: {}" + sb.toString()); diff --git a/src/main/webapp/html/ddasvreintegration/view.jsp b/src/main/webapp/html/ddasvreintegration/view.jsp index 935a7ed..bbf14c0 100644 --- a/src/main/webapp/html/ddasvreintegration/view.jsp +++ b/src/main/webapp/html/ddasvreintegration/view.jsp @@ -14,21 +14,24 @@ <% - Boolean responseResultSuccess = (Boolean) renderRequest.getAttribute("theResult"); +String orderData = (String) renderRequest.getAttribute("orderData"); + +pageContext.setAttribute("orderData", orderData); pageContext.setAttribute("responseResultSuccess", responseResultSuccess); %>

- Ouch, we're sorry an error occurred. Please report the issue on https://support.d4science.org + Ouch, we're sorry an error occurred. Please report the issue on https://support.d4science.org

-

Hi! Your data is being retrieved and saved to your - workspace area, you will receive a notification e-email when - the download process is completed.

+

Your order , is being retrieved and the dataset are being saved to your + workspace area, you will receive an e-email when the + download process is completed. You may close this Tab now.