Commit 5c3f17c3 authored by vkadam's avatar vkadam

((Node) localObject2).getFirstChild() is not NULL to resolve NullPointer Exception in [D16ASUN012]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101663 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7daab5a1
package ibase.webitm.ejb.dis.adv;
//import ibase.scheduler.ejb.BaseRegisteredEJB;
import ibase.scheduler.ejb.BaseRegisteredEJB;
import ibase.scheduler.utility.interfaces.Schedule;
import ibase.system.config.ConnDriver;
import ibase.utility.BaseException;
......@@ -32,7 +32,7 @@ import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
//import org.apache.poi.hsmf.datatypes.PropertyValue.TimePropertyValue;
import org.apache.poi.hsmf.datatypes.PropertyValue.TimePropertyValue;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
......@@ -40,8 +40,7 @@ import org.w3c.dom.NodeList;
public class PorcpConfirmEJB implements Schedule
{
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
GenericUtility genericUtility = GenericUtility.getInstance();
Document dom = null;
boolean isError = false;
......@@ -422,7 +421,7 @@ public class PorcpConfirmEJB implements Schedule
localStatement3.close();
localStatement3 = null;
}
Node localNode1 = null;
Node localNode1 = null,localNode3=null;
localObject2 = null;
NamedNodeMap localNamedNodeMap = null;
String str15 = "";
......@@ -472,7 +471,7 @@ public class PorcpConfirmEJB implements Schedule
{
System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error message from response");
}
if (localNode1 != null)
if (localNode1 != null && localNode1.getFirstChild()!=null)
{
str16 = localNode1.getFirstChild().getNodeValue();
}
......@@ -486,15 +485,20 @@ public class PorcpConfirmEJB implements Schedule
try
{
localObject2 = localDocument2.getElementsByTagName("description").item(0);
// localNode3 = localDocument2.getElementsByTagName("description").item(0);
} catch (Exception localException8)
{
System.out.println("[PorcpConfirmEJB :: schedule()]Exception arises while getting error description from response");
}
if (localObject2 != null)
if (localObject2 != null && ((Node) localObject2).getFirstChild()!=null)
{
str17 = ((Node) localObject2).getFirstChild().getNodeValue();
}
// if (localNode3 != null && localNode3.getFirstChild()!=null)
// {
// str17 = localNode3.getFirstChild().getNodeValue();
// }
localBufferedWriter.write("<ERR_DESCR>'" + str17 + "'</ERR_DESCR>");
localBufferedWriter.newLine();
localBufferedWriter.write(" ");
......@@ -772,6 +776,7 @@ public class PorcpConfirmEJB implements Schedule
String str1 = null;
String str2 = null;
String str3 = "";
String runMode="I";
localNodeList1 = paramDocument.getElementsByTagName("CRITERIA");
if (localNodeList1 != null)
......@@ -820,7 +825,8 @@ public class PorcpConfirmEJB implements Schedule
if ((str2 != null) && (str1 != null))
{
str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1;
// str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1;
str3 = "loginCode=" + str2 + "~~loginSiteCode=" + str1+"~~runMode="+runMode;
System.out.println("xtraParams.." + str3);
} else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment