javax.xml.soap.SOAPElement.getAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中javax.xml.soap.SOAPElement.getAttributes()方法的一些代码示例,展示了SOAPElement.getAttributes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SOAPElement.getAttributes()方法的具体详情如下:
包路径:javax.xml.soap.SOAPElement
类名称:SOAPElement
方法名:getAttributes

SOAPElement.getAttributes介绍

暂无

代码示例

代码示例来源:origin: com.hynnet/xws-security

public NamedNodeMap getAttributes() {
  return delegateElement.getAttributes();
}

代码示例来源:origin: com.hynnet/xws-security

public NamedNodeMap getAttributes() {
  return delegateHeader.getAttributes();
}

代码示例来源:origin: com.hynnet/xws-security

public NamedNodeMap getAttributes() {
  return delegateElement.getAttributes();
}

代码示例来源:origin: com.hynnet/xws-security

public NamedNodeMap getAttributes() {
  return delegateElement.getAttributes();
}

代码示例来源:origin: org.apache.ws.commons.axiom/saaj-testsuite

@Override
  protected void runTest() throws Throwable {
    SOAPElement root = newSOAPFactory().createElement("root", "ns1", "urn:ns1");
    SOAPElement element = root.addChildElement("child", "ns2", "urn:ns2");
    assertThat(element.getLocalName()).isEqualTo("child");
    assertThat(element.getNamespaceURI()).isEqualTo("urn:ns2");
    assertThat(element.getPrefix()).isEqualTo("ns2");
    assertThat(element.getParentNode()).isSameAs(root);
    NamedNodeMap attributes = element.getAttributes();
    assertThat(attributes.getLength()).isEqualTo(1);
    Attr attr = (Attr)attributes.item(0);
    assertThat(attr.getNamespaceURI()).isEqualTo(XMLConstants.XMLNS_ATTRIBUTE_NS_URI);
    assertThat(attr.getPrefix()).isEqualTo(XMLConstants.XMLNS_ATTRIBUTE);
    assertThat(attr.getLocalName()).isEqualTo("ns2");
  }
}

代码示例来源:origin: org.apache.ws.commons.axiom/saaj-testsuite

@Override
  protected void runTest() throws Throwable {
    SOAPElement root = newSOAPFactory().createElement("root", "p", "urn:test");
    SOAPElement element = root.addChildElement("child");
    assertThat(element.getLocalName()).isEqualTo("child");
    assertThat(element.getNamespaceURI()).isNull();
    assertThat(element.getPrefix()).isNull();
    assertThat(element.getParentNode()).isSameAs(root);
    assertThat(element.getAttributes().getLength()).isEqualTo(0);
  }
}

相关文章

微信公众号

最新文章

更多