gpt4 book ai didi

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

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

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

WSSecurityUtil.getSecurityHeader介绍

[英]Returns the first WS-Security header element for a given actor. Only one WS-Security header is allowed for an actor.
[中]返回给定参与者的第一个WS-Security头元素。一个参与者只允许有一个WS-Security头。

代码示例

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

/**
 * Returns the first WS-Security header element for a given actor. Only one
 * WS-Security header is allowed for an actor.
 *
 * @param doc
 * @param actor
 * @return the <code>wsse:Security</code> element or <code>null</code>
 *         if not such element found
 */
public static Element getSecurityHeader(Document doc, String actor) throws WSSecurityException {
  Element soapHeaderElement = getSOAPHeader(doc);
  if (soapHeaderElement == null) { // no SOAP header at all
    return null;
  }
  String soapNamespace = WSSecurityUtil.getSOAPNamespace(doc.getDocumentElement());
  return getSecurityHeader(soapHeaderElement, actor, WSConstants.URI_SOAP12_ENV.equals(soapNamespace));
}

代码示例来源:origin: Evolveum/midpoint

public String getUsernameFromMessage(SOAPMessage saajSoapMessage) throws WSSecurityException {
  if (saajSoapMessage == null) {
    return null;
  }
  Element securityHeader = WSSecurityUtil.getSecurityHeader(saajSoapMessage.getSOAPPart(), "");
  return getUsernameFromSecurityHeader(securityHeader);
}

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

Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
if (elem != null) {
  LOG.debug("Processing WS-Security header for '{}' actor.", actor);

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

Element elem = WSSecurityUtil.getSecurityHeader(doc, actor);
if (elem != null) {
  if (doDebug) {

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

Element elem = WSSecurityUtil.getSecurityHeader(envelopeAsDocument, actor);
WSHandlerResult result = securityEngine
    .processSecurityHeader(elem, validationData);

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

Element elem = WSSecurityUtil.getSecurityHeader(envelopeAsDocument, actor);
WSHandlerResult result = securityEngine
    .processSecurityHeader(elem, validationData);

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

Element elem = WSSecurityUtil.getSecurityHeader(envelopeAsDocument, actor);
WSHandlerResult result = securityEngine
    .processSecurityHeader(elem, validationData);

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

WSSecurityUtil.getSecurityHeader(doc.getSOAPHeader(), actor, version.getVersion() != 1.1);
elem = (Element)DOMUtils.getDomElement(elem);
Node originalNode = null;

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

WSSecurityUtil.getSecurityHeader(doc.getSOAPHeader(), actor, version.getVersion() != 1.1);
elem = (Element)DOMUtils.getDomElement(elem);
Node originalNode = null;

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