use of nl.nn.adapterframework.xml.SaxElementBuilder in project iaf by ibissource.
the class DB2XMLWriter method getRowXml.
public static String getRowXml(IDbmsSupport dbmsSupport, ResultSet rs, int rowNumber, ResultSetMetaData rsmeta, String blobCharset, boolean decompressBlobs, String nullValue, boolean trimSpaces, boolean getBlobSmart) throws SenderException, SQLException, SAXException {
SaxElementBuilder parent = new SaxElementBuilder();
getRowXml(parent, dbmsSupport, rs, rowNumber, rsmeta, blobCharset, decompressBlobs, nullValue, trimSpaces, getBlobSmart);
return parent.toString();
}
use of nl.nn.adapterframework.xml.SaxElementBuilder in project iaf by ibissource.
the class MailFileSystemTestBase method testExtractProblematicMessage.
@Test
public void testExtractProblematicMessage() throws Exception {
M emailMessage = getFirstFileFromFolder("XmlProblem");
SaxElementBuilder xml = new SaxElementBuilder("email");
fileSystem.extractEmail(emailMessage, xml);
xml.close();
String expected = TestFileUtils.getTestFile("/ExchangeMailProblem.xml");
MatchUtils.assertXmlEquals(expected, xml.toString());
}
use of nl.nn.adapterframework.xml.SaxElementBuilder in project iaf by ibissource.
the class MailFileSystemTestBase method testExtractNormalMessage.
@Test
public void testExtractNormalMessage() throws Exception {
M emailMessage = getFirstFileFromFolder(null);
SaxElementBuilder xml = new SaxElementBuilder("email");
fileSystem.extractEmail(emailMessage, xml);
xml.close();
String expected = TestFileUtils.getTestFile("/ExchangeMailNormal.xml");
MatchUtils.assertXmlEquals(expected, xml.toString());
}
use of nl.nn.adapterframework.xml.SaxElementBuilder in project iaf by ibissource.
the class MailFileSystemTestBase method testExtractProblematicMessage2.
@Test
public void testExtractProblematicMessage2() throws Exception {
M emailMessage = getFirstFileFromFolder("XmlProblem2");
SaxElementBuilder xml = new SaxElementBuilder("email");
fileSystem.extractEmail(emailMessage, xml);
xml.close();
String expected = TestFileUtils.getTestFile("/ExchangeMailProblem2.xml");
MatchUtils.assertXmlEquals(expected, xml.toString());
}
use of nl.nn.adapterframework.xml.SaxElementBuilder in project iaf by ibissource.
the class MailFileSystemTestBase method testExtractMessageWithMessageAttached.
// @Test
// public void testExtractMessageWithProblematicAddress2() throws Exception {
// M emailMessage = getFirstFileFromFolder("FromAddressProblem2");
// SaxElementBuilder xml = new SaxElementBuilder("email");
// fileSystem.extractEmail(emailMessage, xml);
// xml.close();
// String expected = TestFileUtils.getTestFile("/ExchangeMailFromAddressProblem2.xml");
// MatchUtils.assertXmlEquals(expected,xml.toString());
// }
//
// @Test
// public void testExtractMessageWithProblematicAddress3() throws Exception {
// M emailMessage = getFirstFileFromFolder("FromAddressProblem3");
// SaxElementBuilder xml = new SaxElementBuilder("email");
// fileSystem.extractEmail(emailMessage, xml);
// xml.close();
// String expected = TestFileUtils.getTestFile("/ExchangeMailFromAddressProblem3.xml");
// MatchUtils.assertXmlEquals(expected,xml.toString());
// }
@Test
public void testExtractMessageWithMessageAttached() throws Exception {
M emailMessage = getFirstFileFromFolder("AttachedMessage");
SaxElementBuilder xml = new SaxElementBuilder("email");
fileSystem.extractEmail(emailMessage, xml);
xml.close();
String expected = TestFileUtils.getTestFile("/ExchangeMailAttachedMessage.xml");
MatchUtils.assertXmlEquals(expected, xml.toString());
}
Aggregations