public Boolean processMessage(GenericMessageHeader gmh)
{
Boolean result = true;
JDBMaterial mat = new JDBMaterial(getHostID(), getSessionID());
JDBMaterialType mattype = new JDBMaterialType(getHostID(), getSessionID());
JDBMaterialLocation matlocn = new JDBMaterialLocation(getHostID(), getSessionID());
JDBLocation locn = new JDBLocation(getHostID(), getSessionID());
JDBMaterialUom matuom = new JDBMaterialUom(getHostID(), getSessionID());
JDBUom uomdb = new JDBUom(getHostID(), getSessionID());
JDBInterface inter = new JDBInterface(getHostID(), getSessionID());
JDBControl ctrl = new JDBControl(getHostID(), getSessionID());
String defaultBatchStatus = ctrl.getKeyValue("DEFAULT BATCH STATUS");
inter.getInterfaceProperties("Material Definition", "Input");
material = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/material").trim());
setErrorMessage("Material " + material + " updated.");
materialType = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/materialType").trim());
if (mattype.isValidMaterialType(materialType)==false)
{
mattype.create(materialType, materialType);
}
description = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/description").trim());
base_uom = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/materialDefinition/base_uom").trim());
base_uom = uomdb.convertUom(inter.getUOMConversion(), base_uom);