コード例 #1
0
ファイル: SOAPFaultTest.java プロジェクト: veithen/ddom
 @Validated
 @Test
 public final void testAddDetailEntryUsingQName() throws Exception {
   Detail detail = createEmptySOAPFault().addDetail();
   DetailEntry detailEntry = detail.addDetailEntry(new QName("urn:ns", "mydetail", "p"));
   assertEquals("urn:ns", detailEntry.getNamespaceURI());
   assertEquals("mydetail", detailEntry.getLocalName());
   assertEquals("p", detailEntry.getPrefix());
   assertSame(detailEntry, detail.getFirstChild());
 }
コード例 #2
0
ファイル: SOAPFaultTest.java プロジェクト: veithen/ddom
 @Validated
 @Test
 public final void testAddDetailEntryUsingName() throws Exception {
   SOAPEnvelope envelope = createSOAPEnvelope();
   Detail detail = envelope.addBody().addFault().addDetail();
   DetailEntry detailEntry = detail.addDetailEntry(envelope.createName("mydetail", "p", "urn:ns"));
   assertEquals("urn:ns", detailEntry.getNamespaceURI());
   assertEquals("mydetail", detailEntry.getLocalName());
   assertEquals("p", detailEntry.getPrefix());
   assertSame(detailEntry, detail.getFirstChild());
 }
コード例 #3
0
ファイル: SOAPFaultTest.java プロジェクト: veithen/ddom
 @Validated
 @Test
 public final void testAddDetailEntryUsingQNameWithoutNamespace() throws Exception {
   Detail detail = createEmptySOAPFault().addDetail();
   DetailEntry detailEntry = detail.addDetailEntry(new QName("mydetail"));
   // TODO: Sun's implementation returns an empty string here (which I believe is incorrect)
   //        assertNull(detailEntry.getNamespaceURI());
   assertEquals("mydetail", detailEntry.getLocalName());
   assertNull(detailEntry.getPrefix());
   assertSame(detailEntry, detail.getFirstChild());
 }