msg.setValue("anyTypeElementCollection", collection);
msg.setValue("anyTypeElementCompValueCollection", valueElement);
valueElement.setValue("value", collection);
StringWriter writer = new StringWriter();
WriterOutput out = new WriterOutput(writer);
m_formatter.format(msg, m_message, out);
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<XMLAnyTest xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><anyTypeElementCollection>" +
sMarkup + "</anyTypeElementCollection><anyTypeElementCollection>" +
sMarkup2 + "</anyTypeElementCollection><anyTypeElementCollection>" +
sMarkup + "</anyTypeElementCollection><anyTypeElementCollection>" +
sMarkup +
"</anyTypeElementCollection><anyTypeElementCompValueCollection>" +
sMarkup + sMarkup2 + sMarkup + sMarkup +
"</anyTypeElementCompValueCollection></XMLAnyTest>", writer.toString());
ArrayList collection2 = new ArrayList(2);
collection2.add(valueElement);
collection2.add(valueElement);
msg.setValue("anyTypeElementCompCollection", collection2);
msg.removeValue("anyTypeElementCompValueCollection");
writer = new StringWriter();
out = new WriterOutput(writer);
m_formatter.format(msg, m_message, out);
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
"<XMLAnyTest xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" +