You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jo...@apache.org on 2007/08/03 02:17:26 UTC
svn commit: r562298 - in
/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis: OagisServices.java
OagisShipmentServices.java
Author: jonesde
Date: Thu Aug 2 17:17:25 2007
New Revision: 562298
URL: http://svn.apache.org/viewvc?view=rev&rev=562298
Log:
Changed to actually use settings from oagis.properties, and if it doesn't find an output mode then to return an error instead of the funny NPE
Modified:
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java?view=diff&rev=562298&r1=562297&r2=562298
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisServices.java Thu Aug 2 17:17:25 2007
@@ -81,6 +81,10 @@
LocalDispatcher dispatcher = ctx.getDispatcher();
String sendToUrl = (String) context.get("sendToUrl");
+ if (UtilValidate.isEmpty(sendToUrl)) {
+ sendToUrl = UtilProperties.getPropertyValue("oagis.properties", "url.send.confirmBod");
+ }
+
String saveToFilename = (String) context.get("saveToFilename");
String saveToDirectory = (String) context.get("saveToDirectory");
OutputStream out = (OutputStream) context.get("outputStream");
@@ -132,6 +136,8 @@
}
} else if (UtilValidate.isNotEmpty(sendToUrl)) {
writer = new StringWriter();
+ } else {
+ return ServiceUtil.returnError("No send to information pass (url, file, or out stream)");
}
ScreenRenderer screens = new ScreenRenderer(writer, bodyParameters, new HtmlScreenRenderer());
Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?view=diff&rev=562298&r1=562297&r2=562298
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Thu Aug 2 17:17:25 2007
@@ -301,6 +301,10 @@
String shipmentId = (String) context.get("shipmentId");
String sendToUrl = (String) context.get("sendToUrl");
+ if (UtilValidate.isEmpty(sendToUrl)) {
+ sendToUrl = UtilProperties.getPropertyValue("oagis.properties", "url.send.processShipment");
+ }
+
String saveToFilename = (String) context.get("saveToFilename");
String saveToDirectory = (String) context.get("saveToDirectory");
OutputStream out = (OutputStream) context.get("outputStream");
@@ -473,6 +477,8 @@
}
} else if (UtilValidate.isNotEmpty(sendToUrl)) {
writer = new StringWriter();
+ } else {
+ return ServiceUtil.returnError("No send to information pass (url, file, or out stream)");
}
ScreenRenderer screens = new ScreenRenderer(writer, bodyParameters, new HtmlScreenRenderer());
@@ -548,6 +554,10 @@
GenericValue userLogin = (GenericValue) context.get("userLogin");
String sendToUrl = (String) context.get("sendToUrl");
+ if (UtilValidate.isEmpty(sendToUrl)) {
+ sendToUrl = UtilProperties.getPropertyValue("oagis.properties", "url.send.receiveDelivery");
+ }
+
String saveToFilename = (String) context.get("saveToFilename");
String saveToDirectory = (String) context.get("saveToDirectory");
OutputStream out = (OutputStream) context.get("outputStream");
@@ -658,6 +668,8 @@
}
} else if (UtilValidate.isNotEmpty(sendToUrl)) {
writer = new StringWriter();
+ } else {
+ return ServiceUtil.returnError("No send to information pass (url, file, or out stream)");
}
ScreenRenderer screens = new ScreenRenderer(writer, bodyParameters, new HtmlScreenRenderer());