diff --git a/oagis/servicedef/secas.xml b/oagis/servicedef/secas.xml index 2ade50411..3605c2662 100644 --- a/oagis/servicedef/secas.xml +++ b/oagis/servicedef/secas.xml @@ -25,15 +25,17 @@ under the License. - + - + + --> + diff --git a/oagis/servicedef/services.xml b/oagis/servicedef/services.xml index 401c7eaf5..2e3a86fc8 100644 --- a/oagis/servicedef/services.xml +++ b/oagis/servicedef/services.xml @@ -94,8 +94,8 @@ under the License. - + Prepare and Optionally Send OAGIS Process Shipment Message. Note on usage: you can pass in either sendToUrl, saveToFilename, or outputStream. If none are passed in the URL in oagis.properties will be used at the target for the message. @@ -106,8 +106,8 @@ under the License. - + Receive Delivery @@ -118,8 +118,8 @@ under the License. - + Process incoming Inventory Sync message @@ -127,24 +127,24 @@ under the License. - + Process incoming shipment message - + Process PO Acknowledge message - + Process RMA Acknowledge message diff --git a/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java b/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java index e0e9443ce..e309b171e 100644 --- a/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java +++ b/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java @@ -61,7 +61,7 @@ public class OagisInventoryServices { public static final String syncInventoryFacilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId"); - public static Map syncInventory(DispatchContext ctx, Map context) { + public static Map oagisReceiveSyncInventory(DispatchContext ctx, Map context) { Document doc = (Document) context.get("document"); boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry")); @@ -285,7 +285,7 @@ public class OagisInventoryServices { dispatcher.runAsync("sendMailFromScreen", sendMap, true); } else { // no send to email address, just log to file - Debug.logImportant("No sendTo email address found in process syncInventory service: inventoryMapList: " + inventoryMapList, module); + Debug.logImportant("No sendTo email address found in process oagisReceiveSyncInventory service: inventoryMapList: " + inventoryMapList, module); } } catch (Throwable t) { String errMsg = "System Error processing Sync Inventory message: " + t.toString(); @@ -357,7 +357,7 @@ public class OagisInventoryServices { return result; } - public static Map receivePoAcknowledge(DispatchContext ctx, Map context) { + public static Map oagisReceiveAcknowledgeDeliveryPo(DispatchContext ctx, Map context) { Document doc = (Document) context.get("document"); boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry")); @@ -602,7 +602,7 @@ public class OagisInventoryServices { return result; } - public static Map receiveRmaAcknowledge(DispatchContext ctx, Map context) { + public static Map oagisReceiveAcknowledgeDeliveryRma(DispatchContext ctx, Map context) { Document doc = (Document) context.get("document"); boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry")); @@ -950,7 +950,7 @@ public class OagisInventoryServices { String statusId = (String) processedStatusIdByReturnIdEntry.getValue(); if (UtilValidate.isNotEmpty(statusId) && statusId.equals("RETURN_ACCEPTED")) { - // TODOLATER (see note below): check to see if all return items have been received, if so then set to received then completed + // TODO (see note below): check to see if all return items have been received, if so then set to received then completed // NOTE DEJ20070815 because of the way the inventory is being received, ie not through the return; reviewing other code it looks like nothing //updates ReturnItem status or anything anyway, and there is no Return/Item stuff on the InventoryItemDetail to track it back; //so giving up on attempt to do this, will support multiple returns per message, but all must be complete a complete one at that, which is a BAD assumption diff --git a/oagis/src/org/ofbiz/oagis/OagisServices.java b/oagis/src/org/ofbiz/oagis/OagisServices.java index 9c486a83f..63307b2e0 100644 --- a/oagis/src/org/ofbiz/oagis/OagisServices.java +++ b/oagis/src/org/ofbiz/oagis/OagisServices.java @@ -529,21 +529,21 @@ public class OagisServices { } } else if (bsrVerb.equalsIgnoreCase("SHOW") && bsrNoun.equalsIgnoreCase("SHIPMENT")) { try { - //subServiceResult = dispatcher.runSync("showShipment", messageProcessContext); + //subServiceResult = dispatcher.runSync("oagisReceiveShowShipment", messageProcessContext); // DEJ20070808 changed to run asynchronously and persisted so that if it fails it will retry; for transaction deadlock and other reasons - dispatcher.runAsync("showShipment", messageProcessContext, true); + dispatcher.runAsync("oagisReceiveShowShipment", messageProcessContext, true); } catch (GenericServiceException e) { - String errMsg = "Error running service showShipment: " + e.toString(); + String errMsg = "Error running service oagisReceiveShowShipment: " + e.toString(); errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if (bsrVerb.equalsIgnoreCase("SYNC") && bsrNoun.equalsIgnoreCase("INVENTORY")) { try { - //subServiceResult = dispatcher.runSync("syncInventory", messageProcessContext); + //subServiceResult = dispatcher.runSync("oagisReceiveSyncInventory", messageProcessContext); // DEJ20070808 changed to run asynchronously and persisted so that if it fails it will retry; for transaction deadlock and other reasons - dispatcher.runAsync("syncInventory", messageProcessContext, true); + dispatcher.runAsync("oagisReceiveSyncInventory", messageProcessContext, true); } catch (GenericServiceException e) { - String errMsg = "Error running service syncInventory: " + e.toString(); + String errMsg = "Error running service oagisReceiveSyncInventory: " + e.toString(); errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } @@ -555,19 +555,19 @@ public class OagisServices { String docType = UtilXml.childElementValue(docRefElement, "of:DOCTYPE"); if ("PO".equals(docType)) { try { - //subServiceResult = dispatcher.runSync("receivePoAcknowledge", messageProcessContext); - dispatcher.runAsync("receivePoAcknowledge", messageProcessContext, true); + //subServiceResult = dispatcher.runSync("oagisReceiveAcknowledgeDeliveryPo", messageProcessContext); + dispatcher.runAsync("oagisReceiveAcknowledgeDeliveryPo", messageProcessContext, true); } catch (GenericServiceException e) { - String errMsg = "Error running service receivePoAcknowledge: " + e.toString(); + String errMsg = "Error running service oagisReceiveAcknowledgeDeliveryPo: " + e.toString(); errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } } else if ("RMA".equals(docType)) { try { - //subServiceResult = dispatcher.runSync("receiveRmaAcknowledge", messageProcessContext); - dispatcher.runAsync("receiveRmaAcknowledge", messageProcessContext, true); + //subServiceResult = dispatcher.runSync("oagisReceiveAcknowledgeDeliveryRma", messageProcessContext); + dispatcher.runAsync("oagisReceiveAcknowledgeDeliveryRma", messageProcessContext, true); } catch (GenericServiceException e) { - String errMsg = "Error running service receiveRmaAcknowledge: " + e.toString(); + String errMsg = "Error running service oagisReceiveAcknowledgeDeliveryRma: " + e.toString(); errorList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "GenericServiceException")); Debug.logError(e, errMsg, module); } diff --git a/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java b/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java index 4c6fb572f..552cd73dd 100644 --- a/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java +++ b/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java @@ -80,7 +80,7 @@ public class OagisShipmentServices { public static final String oagisSegmentsNamespacePrefix = "os"; public static final String oagisFieldsNamespacePrefix = "of"; - public static Map showShipment(DispatchContext ctx, Map context) { + public static Map oagisReceiveShowShipment(DispatchContext ctx, Map context) { Document doc = (Document) context.get("document"); boolean isErrorRetry = Boolean.TRUE.equals(context.get("isErrorRetry")); @@ -469,7 +469,7 @@ public class OagisShipmentServices { return result; } - public static Map oagisProcessShipment(DispatchContext ctx, Map context) { + public static Map oagisSendProcessShipment(DispatchContext ctx, Map context) { LocalDispatcher dispatcher = ctx.getDispatcher(); GenericDelegator delegator = ctx.getDelegator(); String orderId = (String) context.get("orderId"); @@ -505,7 +505,7 @@ public class OagisShipmentServices { OutputStream out = (OutputStream) context.get("outputStream"); - if (Debug.infoOn()) Debug.logInfo("Call to oagisProcessShipment for orderId [" + orderId + "], sendToUrl=[" + sendToUrl + "], saveToDirectory=[" + saveToDirectory + "], saveToFilename=[" + saveToFilename + "]", module); + if (Debug.infoOn()) Debug.logInfo("Call to oagisSendProcessShipment for orderId [" + orderId + "], sendToUrl=[" + sendToUrl + "], saveToDirectory=[" + saveToDirectory + "], saveToFilename=[" + saveToFilename + "]", module); Map result = ServiceUtil.returnSuccess(); MapStack bodyParameters = MapStack.create(); @@ -598,7 +598,7 @@ public class OagisShipmentServices { String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "OagisErrorInCreatingDataForOagisMessageInfoEntity", (Locale) context.get("locale")); Debug.logError(e, errMsg, module); } - if (Debug.infoOn()) Debug.logInfo("Saved OagisMessageInfo for oagisProcessShipment message for orderId [" + orderId + "]", module); + if (Debug.infoOn()) Debug.logInfo("Saved OagisMessageInfo for oagisSendProcessShipment message for orderId [" + orderId + "]", module); String shipmentId = null; try { @@ -709,7 +709,7 @@ public class OagisShipmentServices { Debug.logError(e, errMsg, module); return ServiceUtil.returnError(errMsg); } - if (Debug.infoOn()) Debug.logInfo("Finished rendering oagisProcessShipment message for orderId [" + orderId + "]", module); + if (Debug.infoOn()) Debug.logInfo("Finished rendering oagisSendProcessShipment message for orderId [" + orderId + "]", module); try { comiCtx.put("processingStatusId", "OAGMP_OGEN_SUCCESS"); @@ -725,7 +725,7 @@ public class OagisShipmentServices { Map sendMessageReturn = OagisServices.sendMessageText(outText, out, sendToUrl, saveToDirectory, saveToFilename); - if (Debug.infoOn()) Debug.logInfo("Message send done for oagisProcessShipment for orderId [" + orderId + "], sendToUrl=[" + sendToUrl + "], saveToDirectory=[" + saveToDirectory + "], saveToFilename=[" + saveToFilename + "]", module); + if (Debug.infoOn()) Debug.logInfo("Message send done for oagisSendProcessShipment for orderId [" + orderId + "], sendToUrl=[" + sendToUrl + "], saveToDirectory=[" + saveToDirectory + "], saveToFilename=[" + saveToFilename + "]", module); try { comiCtx.put("processingStatusId", "OAGMP_SENT"); dispatcher.runSync("updateOagisMessageInfo", comiCtx, 60, true); @@ -742,7 +742,7 @@ public class OagisShipmentServices { return result; } - public static Map oagisReceiveDelivery(DispatchContext dctx, Map context) { + public static Map oagisSendReceiveDelivery(DispatchContext dctx, Map context) { LocalDispatcher dispatcher = dctx.getDispatcher(); GenericDelegator delegator = dctx.getDelegator(); String returnId = (String) context.get("returnId"); diff --git a/oagis/webapp/oagis/WEB-INF/controller.xml b/oagis/webapp/oagis/WEB-INF/controller.xml index df2463b4e..15e0a5998 100644 --- a/oagis/webapp/oagis/WEB-INF/controller.xml +++ b/oagis/webapp/oagis/WEB-INF/controller.xml @@ -181,9 +181,9 @@ - + - + @@ -193,21 +193,21 @@ - + - + - + - + - + - +