List of usage examples for javax.xml.soap SOAPElement createQName
public QName createQName(String localName, String prefix) throws SOAPException;
From source file:com.googlecode.ddom.frontend.saaj.SOAPElementTest.java
@Validated @Test(expected = SOAPException.class) public void testCreateQNameWithUnknownPrefix() throws Exception { SOAPElement element = saajUtil.createSOAPElement("urn:ns", "test", null); element.createQName("local", "nonexistingprefix"); }
From source file:com.googlecode.ddom.frontend.saaj.SOAPElementTest.java
@Validated @Test/*from w ww . ja v a 2 s. c om*/ public void testCreateQNameWithAddNamespaceDeclaration() throws Exception { SOAPElement element = saajUtil.createSOAPElement("urn:ns", "test", null); element.addNamespaceDeclaration("p", "urn:test"); QName qname = element.createQName("local", "p"); assertEquals("p", qname.getPrefix()); assertEquals("local", qname.getLocalPart()); assertEquals("urn:test", qname.getNamespaceURI()); }