Added temporary log message to show incoming message text, just in case it blows up somewhere (quite a few bugs in processing so far); also added check for empty verb/noun to avoid NPEs
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@562836 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -342,6 +342,9 @@ public class OagisServices {
|
||||
xmlTextBuf.append('\n');
|
||||
}
|
||||
xmlText = xmlTextBuf.toString();
|
||||
|
||||
// DEJ20070804 adding this temporarily for debugging, should be changed to verbose at some point in the future
|
||||
Debug.logInfo("Received OAGIS XML message, here is the text: \n" + xmlText, module);
|
||||
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(xmlText.getBytes("UTF-8"));
|
||||
doc = UtilXml.readXmlDocument(bis, true, "OagisMessage");
|
||||
@@ -370,6 +373,10 @@ public class OagisServices {
|
||||
String bsrVerb = UtilXml.childElementValue(bsrElement, "of:VERB");
|
||||
String bsrNoun = UtilXml.childElementValue(bsrElement, "of:NOUN");
|
||||
|
||||
if (UtilValidate.isEmpty(bsrVerb) || UtilValidate.isEmpty(bsrNoun)) {
|
||||
return ServiceUtil.returnError("Was able to receive and parse the XML message, but BSR->NOUN [" + bsrNoun + "] and/or BSR->VERB [" + bsrVerb + "] are empty");
|
||||
}
|
||||
|
||||
// TODO: before dispatching the message, make sure the combined ID (primary of OagisMessageInfo entity) is not in the database, ie hasn't been received already
|
||||
|
||||
Map subServiceResult = FastMap.newInstance();
|
||||
|
||||
Reference in New Issue
Block a user