gpt4 book ai didi

org.apache.wss4j.dom.util.WSSecurityUtil.findBodyElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 20:21:05 25 4
gpt4 key购买 nike

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

WSSecurityUtil.findBodyElement介绍

[英]return the first soap "Body" element.
[中]返回第一个soap“Body”元素。

代码示例

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
   * Get the SOAP Body
   */
  public Element getSOAPBody() {
    return WSSecurityUtil.findBodyElement(doc);
  }
}

代码示例来源:origin: apache/cxf

/**
   * Get the SOAP Body
   */
  @Override
  public Element getSOAPBody() {
    soapBody = (Element)DOMUtils.getDomElement(soapBody);
    if (soapBody != null) {
      return soapBody;
    }
    return WSSecurityUtil.findBodyElement(doc);
  }
}

代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security

/**
   * Get the SOAP Body
   */
  @Override
  public Element getSOAPBody() {
    soapBody = (Element)DOMUtils.getDomElement(soapBody);
    if (soapBody != null) {
      return soapBody;
    }
    return WSSecurityUtil.findBodyElement(doc);
  }
}

代码示例来源:origin: holodeck-b2b/Holodeck-B2B

/**
 * Checks whether the given reference applies to the given payload.
 *
 * @param pl            The payload to check
 * @param refURI        The reference to check
 * @param domEnvelope   The DOM representation of the SOAP envelope
 * @return              <code>true</code> if this reference applies to a payload of the message,<br>
 *                      <code>false</code> otherwise
 */
public static boolean isPayloadReferenced(final IPayload pl, final String refURI, final Document domEnvelope) {
  final String plURI = pl.getPayloadURI();
  // Because the reference in payload object does not contain prefix, use endsWith instead of equals
  if (plURI != null && refURI.endsWith(plURI))
    return true;
  else if (pl.getContainment() == IPayload.Containment.BODY) {
    // If not it can still refer to the payload in the SOAP body. The reference's URI should then be equal
    // to the Id of the SOAP Body element (again ref URI has '#' prefix, so again endsWith is used)
    Element bodyElement = WSSecurityUtil.findBodyElement(domEnvelope);
    return bodyElement != null && refURI.endsWith(getId(bodyElement));
  } else
    return false;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com