Commit dae3d2ce authored by smestry's avatar smestry

Changed for lotno and lotsl null values.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101924 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6a3d49fc
......@@ -23,6 +23,10 @@ import org.w3c.dom.*;
import javax.ejb.*;
import javax.naming.InitialContext;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import ibase.system.config.*;
import ibase.utility.CommonConstants;
......@@ -5675,7 +5679,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
}//if ( "N".equalsIgnoreCase(selectedVal.trim()) )
}//if ( currDetail.getAttributes().getNamedItem( "selected" )
}//outer for loop
updatedDetailDomStr = genericUtility.serializeDom( detailDom );
//updatedDetailDomStr = genericUtility.serializeDom( detailDom );
updatedDetailDomStr = serializeDom( detailDom ); //Added by manish on 14/06/16 for wildfly [override method serializeDom from genericutility and change for lot_no and lot_sl]
System.out.println("updatedDetailDomStr:>>>>>>>>>>> "+updatedDetailDomStr);
}
catch (Exception e)
......@@ -5720,7 +5725,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
String attribValue = "";
try
{
String domStr = genericUtility.serializeDom(detailNode);
//String domStr = genericUtility.serializeDom(detailNode);
String domStr = serializeDom(detailNode); //Added by manish on 14/06/16 for wildfly [override method serializeDom from genericutility and change for lot_no and lot_sl]
Document dom = genericUtility.parseString(domStr);
if( dom != null /*&& dom.getAttributes() != null*/)
{
......@@ -5883,4 +5889,54 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
return arryList;
}
//Changed by sumit on 22/05/13 checking duplicate lot_sl__new end
//Changed by Manish on 14/06/16[start]
public String serializeDom(Node dom)throws ITMException
{
String retString = null;
//changed by Nilesh Soor on 24/07/2014 [Memory Leak Issue]
ByteArrayOutputStream out = null;
Transformer serializer = null;
//changed by Nilesh Soor on 24/07/2014 [Memory Leak Issue]
try
{
out = new ByteArrayOutputStream();
serializer = TransformerFactory.newInstance().newTransformer();
serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
serializer.setOutputProperty(OutputKeys.ENCODING, CommonConstants.ENCODING);
serializer.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS,"lot_no lot_sl "); //Added by manish on 12/05/16 for wildfly
serializer.transform(new DOMSource(dom), new javax.xml.transform.stream.StreamResult(out));
retString = out.toString( CommonConstants.ENCODING );
out.flush();
out.close();
out = null;
}
catch (Exception e)
{
System.out.println("Exception : GenericUtility : serializeDom :"+e);
throw new ITMException(e);
}
finally//changed by Nilesh Soor on 24/07/2014 [Memory Leak Issue]
{
if(out != null)
{
try
{
out.close();
}
catch (IOException e)
{
throw new ITMException(e);
}
finally
{
out = null;
}
}
serializer = null;
}
return retString;
}
//Changed by Manish on 14/06/16[end]
}
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