/** * 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()); }
callbackLookup = new DOMCallbackLookup(doc); return callbackLookup.getElement(id, type, true);
callbackLookup.getElement(dataRefURI, null, true); if (encryptedDataElement == null) { throw new WSSecurityException(
/** * 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()); }
callbackLookup.getElement(dataRefURI, null, true); if (encryptedDataElement == null) { throw new WSSecurityException(
callbackLookup = new DOMCallbackLookup(doc); return callbackLookup.getElement(id, type, true);
Reference reference = (Reference)referenceIterator.next(); String uri = reference.getURI(); Element element = callbackLookup.getElement(uri, null, true); if (element == null) { element = wsDocInfo.getTokenElement(uri);
Reference reference = (Reference)referenceIterator.next(); String uri = reference.getURI(); Element element = callbackLookup.getElement(uri, null, true); if (element == null) { element = wsDocInfo.getTokenElement(uri);
callbackLookup = new DOMCallbackLookup(doc); element = callbackLookup.getElement(idToSign, null, false);
callbackLookup = new DOMCallbackLookup(doc); element = callbackLookup.getElement(idToSign, null, false);