Commit e8d8a4f6 authored by pchavan's avatar pchavan

to show errr msg if guid not found.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197668 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0217d9a7
...@@ -75,25 +75,38 @@ public class SCMWebServiceDao extends ValidatorEJB ...@@ -75,25 +75,38 @@ public class SCMWebServiceDao extends ValidatorEJB
conn = getConnection(); conn = getConnection();
if(RefNo == null || RefNo.trim().length() ==0) if(RefNo == null || RefNo.trim().length() ==0)
{ {
sql = "select tran_id ,ref_no from receipt where GUID = ? "; if(uniqueId == null || uniqueId.trim().length() ==0)
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, uniqueId);
rs = pstmt.executeQuery();
if (rs.next())
{
tranid = E12GenericUtility.checkNull(rs.getString("tran_id"));
RefNo = E12GenericUtility.checkNull(rs.getString("ref_no"));
}
System.out.println("tranid["+tranid+"]" + "RefNo["+RefNo+"]");
if (pstmt != null)
{ {
pstmt.close(); System.out.println("inside unique id ");
pstmt = null; retSBuff.append("<msg_code><![CDATA[]]></msg_code>");
retSBuff.append("<msg_descr><![CDATA[Receipt against the given GUID is Not found]]></msg_descr>");
retSBuff.append("<result><![CDATA[FAILED]]></result>");
retSBuff.append("</Root>");
retString = retSBuff.toString();
return retString;
} }
if (rs != null) else
{ {
rs.close(); sql = "select tran_id ,ref_no from receipt where GUID = ? ";
rs = null; pstmt = conn.prepareStatement(sql);
pstmt.setString(1, uniqueId);
rs = pstmt.executeQuery();
if (rs.next())
{
tranid = E12GenericUtility.checkNull(rs.getString("tran_id"));
RefNo = E12GenericUtility.checkNull(rs.getString("ref_no"));
}
System.out.println("tranid["+tranid+"]" + "RefNo["+RefNo+"]");
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
} }
System.out.println("Calling setNodeValue in RefNo.:"); System.out.println("Calling setNodeValue in RefNo.:");
......
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