org.apache.ws.security.WSEncryptionPart.getName()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(143)

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

WSEncryptionPart.getName介绍

暂无

代码示例

代码示例来源:origin: org.apache.rampart/rampart-core

if (signedPart.getNamespace() == null || signedPart.getName() == null) {
  continue;
  if (encryptedPart.getNamespace() == null || encryptedPart.getName() == null) {
    continue;
  if (signedPart.getName().equals(encryptedPart.getName()) &&
      signedPart.getNamespace().equals(encryptedPart.getNamespace())) {
        signedParts.remove(signedPart);
        signedParts.add(createEncryptionPart(signedPart.getName(), encHeaderId,
            signedPart.getNamespace(),
            signedPart.getEncModifier(), signedPart.getXpath()));

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

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

/**
 * Find the DOM Element in the SOAP Envelope that is referenced by the 
 * WSEncryptionPart argument. The "Id" is used before the Element localname/namespace.
 * 
 * @param part The WSEncryptionPart object corresponding to the DOM Element(s) we want
 * @param callbackLookup The CallbackLookup object used to find Elements
 * @param doc The owning document
 * @return the DOM Element in the SOAP Envelope that is found
 */
public static List<Element> findElements(
  WSEncryptionPart part, CallbackLookup callbackLookup, Document doc
) throws WSSecurityException {
  // See if the DOM Element is stored in the WSEncryptionPart first
  if (part.getElement() != null) {
    return Collections.singletonList(part.getElement());
  }
  
  // Next try to find the Element via its wsu:Id
  String id = part.getId();
  if (id != null) {
    Element foundElement = callbackLookup.getElement(id, null, false);
    return Collections.singletonList(foundElement);
  }
  // Otherwise just lookup all elements with the localname/namespace
  return callbackLookup.getElements(part.getName(), part.getNamespace());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

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

/**
 * Find the DOM Element in the SOAP Envelope that is referenced by the 
 * WSEncryptionPart argument. The "Id" is used before the Element localname/namespace.
 * 
 * @param part The WSEncryptionPart object corresponding to the DOM Element(s) we want
 * @param callbackLookup The CallbackLookup object used to find Elements
 * @param doc The owning document
 * @return the DOM Element in the SOAP Envelope that is found
 */
public static List<Element> findElements(
  WSEncryptionPart part, CallbackLookup callbackLookup, Document doc
) throws WSSecurityException {
  // See if the DOM Element is stored in the WSEncryptionPart first
  if (part.getElement() != null) {
    return Collections.singletonList(part.getElement());
  }
  
  // Next try to find the Element via its wsu:Id
  String id = part.getId();
  if (id != null) {
    Element foundElement = callbackLookup.getElement(id, null, false);
    return Collections.singletonList(foundElement);
  }
  // Otherwise just lookup all elements with the localname/namespace
  return callbackLookup.getElements(part.getName(), part.getNamespace());
}

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

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

代码示例来源:origin: org.apache.rampart/rampart-core

if (wsep.getName().equals(WSConstants.ELEM_BODY)) {
} else if (wsep.getName().equals(WSConstants.ELEM_HEADER) ||
    wsep.getXpath() != null) {
      envelope, wsep.getName(), wsep.getNamespace());
  throw new RampartException(msg, new String[]{wsep.getNamespace() + ":" + wsep.getName()});

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

代码示例来源:origin: org.apache.rampart/rampart-core

if (part.getName() == null) {
  OMElement e = header.getFirstChildWithName(new QName(part.getNamespace(), part.getName()));
  if (e != null) {
    if (!found.contains(e)) {

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

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

代码示例来源:origin: org.apache.rampart/rampart-core

if (encryptedPart.getName().equals(WSConstants.ELEM_BODY)) {
  continue;
if ((WSConstants.SIG_LN.equals(encryptedPart.getName()) &&
    WSConstants.SIG_NS.equals(encryptedPart.getNamespace()))
    || encryptedPart.getEncModifier().equals(WSConstants.ELEM_HEADER)) {
  if (!isRefIdPresent(encrRefs, new QName(encryptedPart.getNamespace(), encryptedPart.getName()))) {
    throw new RampartException("encryptedPartMissing",
        new String[]{encryptedPart.getNamespace() + ":" + encryptedPart.getName()});

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

} else {
  for (WSEncryptionPart part : parts) {
    if ("STRTransform".equals(part.getName()) && part.getId() == null) {
      part.setId(strUri);

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

WSSecurityException.FAILURE,
  "noEncElement", 
  new Object[] {"{" + encPart.getNamespace() + "}" + encPart.getName()}
);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

WSSecurityException.FAILURE,
  "noEncElement", 
  new Object[] {"{" + encPart.getNamespace() + "}" + encPart.getName()}
);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

String elemName = encPart.getName();
Element element = encPart.getElement();

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

String elemName = encPart.getName();
Element element = encPart.getElement();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

boolean signBST = false;
for (WSEncryptionPart part : reqData.getSignatureParts()) {
  if ("STRTransform".equals(part.getName()) && part.getId() == null) {
    part.setId(wsSign.getSecurityTokenReferenceURI());
  } else if (reqData.isAppendSignatureAfterTimestamp()
      && WSConstants.WSU_NS.equals(part.getNamespace()) 
      && "Timestamp".equals(part.getName())) {
    int originalSignatureActionIndex = 
      reqData.getOriginalSignatureActionPosition();
    && WSConstants.BINARY_TOKEN_LN.equals(part.getName())) {
    signBST = true;

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

boolean signBST = false;
for (WSEncryptionPart part : reqData.getSignatureParts()) {
  if ("STRTransform".equals(part.getName()) && part.getId() == null) {
    part.setId(wsSign.getSecurityTokenReferenceURI());
  } else if (reqData.isAppendSignatureAfterTimestamp()
      && WSConstants.WSU_NS.equals(part.getNamespace()) 
      && "Timestamp".equals(part.getName())) {
    int originalSignatureActionIndex = 
      reqData.getOriginalSignatureActionPosition();
    && WSConstants.BINARY_TOKEN_LN.equals(part.getName())) {
    signBST = true;

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

for (WSEncryptionPart encP : reqData.getSignatureParts()) {
  if (WSConstants.WSU_NS.equals(encP.getNamespace()) 
    && "Timestamp".equals(encP.getName())) {
    signTimestamp = true;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.wss4j

for (WSEncryptionPart encP : reqData.getSignatureParts()) {
  if (WSConstants.WSU_NS.equals(encP.getNamespace()) 
    && "Timestamp".equals(encP.getName())) {
    signTimestamp = true;

相关文章