You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2007/07/06 17:24:56 UTC

svn commit: r553928 - /ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

Author: apatel
Date: Fri Jul  6 08:24:55 2007
New Revision: 553928

URL: http://svn.apache.org/viewvc?view=rev&rev=553928
Log:
code cleanup in showShipmen service.

Modified:
    ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

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=553928&r1=553927&r2=553928
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java Fri Jul  6 08:24:55 2007
@@ -97,15 +97,7 @@
         Document doc = null;
         try {
             doc = UtilXml.readXmlDocument(in, true, "ShowShipment");
-        } catch (SAXException e) {
-            String errMsg = "Error parsing the ShowShipmentResponse";
-            errorList.add(errMsg);
-            Debug.logError(e, errMsg, module);
-        } catch (ParserConfigurationException e) {
-            String errMsg = "Error parsing the ShowShipmentResponse";
-            errorList.add(errMsg);
-            Debug.logError(e, errMsg, module);
-        } catch (IOException e) {
+        } catch (Exception e) {
             String errMsg = "Error parsing the ShowShipmentResponse";
             errorList.add(errMsg);
             Debug.logError(e, errMsg, module);
@@ -113,9 +105,10 @@
             
         GenericValue userLogin =null; 
         try {
-            userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "admin"));    
+            userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));    
         } catch (GenericEntityException e){
-            String errMsg = "Error Getting UserLogin with userLoginId 'admin'";
+            String errMsg = "Error Getting UserLogin with userLoginId system ";
+            errorList.add(errMsg);
             Debug.logError(e, errMsg, module);
         }
                     
@@ -128,10 +121,7 @@
         String bsrNoun = UtilXml.childElementValue(bsrElement, "N2:NOUN");
         String bsrRevision = UtilXml.childElementValue(bsrElement, "N2:REVISION");
           
-        Map oagisMsgInfoCtx = new HashMap();
-        oagisMsgInfoCtx.put("bsrVerb", bsrVerb);
-        oagisMsgInfoCtx.put("bsrNoun", bsrNoun);
-        oagisMsgInfoCtx.put("bsrRevision", bsrRevision);
+        Map oagisMsgInfoCtx = UtilMisc.toMap("bsrVerb", bsrVerb, "bsrNoun", bsrNoun, "bsrRevision", bsrRevision);
             
         Element senderElement = UtilXml.firstChildElement(controlAreaElement, "N1:SENDER");
         String logicalId = UtilXml.childElementValue(senderElement, "N2:LOGICALID");
@@ -228,7 +218,8 @@
             result.put(ModelService.ERROR_MESSAGE_LIST, errorList);
             result.put("reasonCode", "1000"); 
             result.put("description", "processing message failed");
-            return result;
+        } else {
+            result.put(ModelService.RESPONSE_MESSAGE,ModelService.RESPOND_SUCCESS); 
         }
         return result;
     }