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

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

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

SOAPElement.getAttributeValue介绍

[英]Returns the value of the attribute with the specified qname.
[中]

代码示例

代码示例来源:origin: org.springframework.ws/org.springframework.ws

@Override
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
  return element.getAttributeValue(name);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public String getAttributeValue(QName name) {
  return element.getAttributeValue(name);
}

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

public String getAttributeValue(Name arg0) {
  return delegateElement.getAttributeValue(arg0);
}

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

public String getId() {
  return delegateElement.getAttributeValue(idAttributeName);
}

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

public String getAttributeValue(Name name) {
  return delegateElement.getAttributeValue(name);
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

@Override
public String getAttributeValue(QName name) {
  return element.getAttributeValue(name);
}

代码示例来源:origin: spring-projects/spring-ws

@Override
public String getAttributeValue(QName name) {
  return element.getAttributeValue(name);
}

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

public String getAttributeValue(Name arg0) {
  return delegateHeader.getAttributeValue(arg0);
}

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

public String getAttributeValue(Name arg0) {
  return delegateElement.getAttributeValue(arg0);
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

@Override
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
  Name attributeName = SaajUtils.toName(name, element);
  return element.getAttributeValue(attributeName);
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

@Override
public String getAttributeValue(SOAPElement element, QName name) throws SOAPException {
  Name attributeName = SaajUtils.toName(name, element);
  return element.getAttributeValue(attributeName);
}

代码示例来源:origin: apache/servicemix-bundles

private static Locale getLocale(SOAPElement reasonText) {
  return xmlLangToLocale(reasonText.getAttributeValue(getXmlLangName()));
}

代码示例来源:origin: apache/servicemix-bundles

private Attributes getAttributes(SOAPElement element) {
  AttributesImpl attributes = new AttributesImpl();
  for (Iterator<?> iterator = element.getAllAttributes(); iterator.hasNext();) {
    Name attributeName = (Name) iterator.next();
    String namespace = attributeName.getURI();
    if (namespace == null || !namespacesFeature) {
      namespace = "";
    }
    String attributeValue = element.getAttributeValue(attributeName);
    attributes.addAttribute(namespace, attributeName.getLocalName(), attributeName.getQualifiedName(), "CDATA",
        attributeValue);
  }
  if (namespacePrefixesFeature) {
    for (Iterator<?> iterator = element.getNamespacePrefixes(); iterator.hasNext();) {
      String prefix = (String) iterator.next();
      String namespaceUri = element.getNamespaceURI(prefix);
      String qName;
      if (StringUtils.hasLength(prefix)) {
        qName = "xmlns:" + prefix;
      }
      else {
        qName = "xmlns";
      }
      attributes.addAttribute("", "", qName, "CDATA", namespaceUri);
    }
  }
  return attributes;
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

private Attributes getAttributes(SOAPElement element) {
  AttributesImpl attributes = new AttributesImpl();
  for (Iterator<?> iterator = element.getAllAttributes(); iterator.hasNext();) {
    Name attributeName = (Name) iterator.next();
    String namespace = attributeName.getURI();
    if (namespace == null || !namespacesFeature) {
      namespace = "";
    }
    String attributeValue = element.getAttributeValue(attributeName);
    attributes.addAttribute(namespace, attributeName.getLocalName(), attributeName.getQualifiedName(), "CDATA",
        attributeValue);
  }
  if (namespacePrefixesFeature) {
    for (Iterator<?> iterator = element.getNamespacePrefixes(); iterator.hasNext();) {
      String prefix = (String) iterator.next();
      String namespaceUri = element.getNamespaceURI(prefix);
      String qName;
      if (StringUtils.hasLength(prefix)) {
        qName = "xmlns:" + prefix;
      }
      else {
        qName = "xmlns";
      }
      attributes.addAttribute("", "", qName, "CDATA", namespaceUri);
    }
  }
  return attributes;
}

代码示例来源:origin: spring-projects/spring-ws

private Attributes getAttributes(SOAPElement element) {
  AttributesImpl attributes = new AttributesImpl();
  for (Iterator<?> iterator = element.getAllAttributes(); iterator.hasNext();) {
    Name attributeName = (Name) iterator.next();
    String namespace = attributeName.getURI();
    if (namespace == null || !namespacesFeature) {
      namespace = "";
    }
    String attributeValue = element.getAttributeValue(attributeName);
    attributes.addAttribute(namespace, attributeName.getLocalName(), attributeName.getQualifiedName(), "CDATA",
        attributeValue);
  }
  if (namespacePrefixesFeature) {
    for (Iterator<?> iterator = element.getNamespacePrefixes(); iterator.hasNext();) {
      String prefix = (String) iterator.next();
      String namespaceUri = element.getNamespaceURI(prefix);
      String qName;
      if (StringUtils.hasLength(prefix)) {
        qName = "xmlns:" + prefix;
      }
      else {
        qName = "xmlns";
      }
      attributes.addAttribute("", "", qName, "CDATA", namespaceUri);
    }
  }
  return attributes;
}

代码示例来源:origin: jasperreports/jasperreports

protected void handleHierInfo(JRXmlaResultAxis axis, SOAPElement hierInfoElement) throws SOAPException
{
  Name name = sf.createName("name");
  String dimName = hierInfoElement.getAttributeValue(name); // Get the Dimension Name
  JRXmlaHierarchy hier = new JRXmlaHierarchy(dimName);
  axis.addHierarchy(hier);
}

代码示例来源:origin: org.apache.axis2/axis2-saaj

childEle.addAttribute(name, soapElement.getAttributeValue(name));

代码示例来源:origin: jasperreports/jasperreports

protected void parseAxesElement(SOAPElement axesElement) throws SOAPException
{
  // Cycle over Axis-Elements
  Name aName = sf.createName("Axis", "", MDD_URI);
  Iterator itAxis = axesElement.getChildElements(aName);
  while (itAxis.hasNext())
  {
    SOAPElement axisElement = (SOAPElement) itAxis.next();
    Name name = sf.createName("name");
    String axisName = axisElement.getAttributeValue(name);
    if (axisName.equals(SLICER_AXIS_NAME))
    {
      continue;
    }
    // LookUp for the Axis
    JRXmlaResultAxis axis = xmlaResult.getAxisByName(axisName);
    // retrieve the tuples by <Tuples>
    name = sf.createName("Tuples", "", MDD_URI);
    Iterator itTuples = axisElement.getChildElements(name);
    if (itTuples.hasNext())
    {
      SOAPElement eTuples = (SOAPElement) itTuples.next();
      handleTuplesElement(axis, eTuples);
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-saaj

childEle.addAttribute(name, soapElement.getAttributeValue(name));

代码示例来源:origin: jasperreports/jasperreports

protected void parseAxesInfoElement(SOAPElement axesInfoElement) throws SOAPException
{
  // Cycle over AxisInfo-Elements
  Name axisInfoName = sf.createName("AxisInfo", "", MDD_URI);
  Iterator itAxis = axesInfoElement.getChildElements(axisInfoName);
  while (itAxis.hasNext())
  {
    SOAPElement axisElement = (SOAPElement) itAxis.next();
    Name name = sf.createName("name");
    String axisName = axisElement.getAttributeValue(name);
    if (axisName.equals(SLICER_AXIS_NAME))
    {
      continue;
    }
    JRXmlaResultAxis axis = new JRXmlaResultAxis(axisName);
    xmlaResult.addAxis(axis);
    // retrieve the hierarchies by <HierarchyInfo>
    name = sf.createName("HierarchyInfo", "", MDD_URI);
    Iterator itHierInfo = axisElement.getChildElements(name);
    while (itHierInfo.hasNext())
    {
      SOAPElement eHierInfo = (SOAPElement) itHierInfo.next();
      handleHierInfo(axis, eHierInfo);
    }
  }
}

相关文章

微信公众号

最新文章

更多