List of usage examples for javax.xml.soap SOAPElement getTextContent
public String getTextContent() throws DOMException;
From source file:com.googlecode.ddom.frontend.saaj.SOAPElementTest.java
/** * Checks the behavior of {@link SOAPElement#addTextNode(String)} when called with a string that * contains a character that is invalid according to the XML specification. The reference * implementation doesn't check for invalid characters. * /*from w w w . j ava 2s. c om*/ * @throws Exception */ @Validated @Test public void testAddTextNodeWithInvalidChar() throws Exception { SOAPElement element = saajUtil.createSOAPElement(null, "test", null); String testString = String.valueOf((char) 24); element.addTextNode(testString); assertEquals(testString, element.getTextContent()); }
From source file:com.googlecode.ddom.frontend.saaj.SOAPElementTest.java
@Validated @Test//from w ww .jav a 2 s. c om public void testAddTextNode() throws Exception { SOAPElement element = saajUtil.createSOAPElement(null, "test", null); SOAPElement returnValue = element.addTextNode("text"); assertSame(element, returnValue); assertEquals("text", element.getTextContent()); }
From source file:com.googlecode.ddom.frontend.saaj.SOAPElementTest.java
@Validated @Test/*from ww w . ja v a 2 s .c o m*/ public void testAddTextNode2() throws Exception { SOAPElement element = saajUtil.createSOAPElement(null, "test", null); element.addTextNode("ABC"); element.addTextNode("DEF"); assertEquals(2, element.getChildNodes().getLength()); assertEquals("ABCDEF", element.getTextContent()); }