Commit 6dc25c0f authored by steurwadkar's avatar steurwadkar

Changed by Manish on 06/07/16.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@102334 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9fd87c00
......@@ -5686,8 +5686,7 @@ 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 = serializeDom( detailDom ); //Added by manish on 14/06/16 for wildfly [override method serializeDom from genericutility and change for lot_no and lot_sl]
updatedDetailDomStr = genericUtility.serializeDom( detailDom );
System.out.println("updatedDetailDomStr:>>>>>>>>>>> "+updatedDetailDomStr);
}
catch (Exception e)
......@@ -5732,8 +5731,7 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
String attribValue = "";
try
{
//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]
String domStr = genericUtility.serializeDom(detailNode);
Document dom = genericUtility.parseString(domStr);
if( dom != null /*&& dom.getAttributes() != null*/)
{
......@@ -5897,53 +5895,4 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
}
//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]
}
......@@ -2375,8 +2375,7 @@ public class StockTransferGrlIC extends ValidatorEJB implements StockTransferGrl
}//if ( "N".equalsIgnoreCase(selectedVal.trim()) )
}//if ( currDetail.getAttributes().getNamedItem( "selected" )
}//outer for loop
// updatedDetailDomStr = genericUtility.serializeDom( detailDom );
updatedDetailDomStr = serializeDom( detailDom ); //Added by manish on 12/05/16 for wildfly [override method serializeDom from genericutility and change for lot_no and lot_sl]
updatedDetailDomStr = genericUtility.serializeDom( detailDom );
System.out.println("updatedDetailDomStr:>>>>>>>>>>> "+updatedDetailDomStr);
}
catch (Exception e)
......@@ -3209,53 +3208,4 @@ public class StockTransferGrlIC extends ValidatorEJB implements StockTransferGrl
//Changed by wasim on 13-04-2015 to get the location weigth and volume end.
// Changed by Manish on 05/11/15 for DDWMS merging [end]
//Changed by Manish on 12/05/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__fr lot_no__to lot_sl__fr lot_sl__to"); //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 12/05/16[end]
}
\ No newline at end of file
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