}
public Boolean processMessage(GenericMessageHeader gmh) {
Boolean result = false;
JDBMaterialBatch batch = new JDBMaterialBatch(getHostID(), getSessionID());
String material = "12345";
String batchStr = "";
String status = "";
int occur = 1;
while (material.length() > 0)
{
material = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/material[" + String.valueOf(occur) + "]").trim());
batchStr = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/batch[" + String.valueOf(occur) + "]").trim());
status = JUtility.replaceNullStringwithBlank(gmh.getXMLDocument().findXPath("//message/messageData/batchStatusChange/status[" + String.valueOf(occur) + "]").trim());
if (material.length() > 0)
{
if (batch.getMaterialBatchProperties(material, batchStr) == true)
{
batch.setStatus(status);
batch.update();
result = true;
setErrorMessage(String.valueOf(occur) + " Batch(s) updated");
}
else
{