1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.wssecurity.impl;
18
19 import javax.xml.namespace.QName;
20
21 import org.opensaml.ws.wssecurity.SignatureConfirmation;
22 import org.opensaml.xml.XMLObject;
23 import org.opensaml.xml.io.UnmarshallingException;
24 import org.opensaml.xml.util.XMLHelper;
25 import org.w3c.dom.Attr;
26
27
28
29
30 public class SignatureConfirmationUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {
31
32
33 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
34 SignatureConfirmation sc = (SignatureConfirmation) xmlObject;
35
36 QName attrName =
37 XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix());
38 if (SignatureConfirmation.WSU_ID_ATTR_NAME.equals(attrName)) {
39 sc.setWSUId(attribute.getValue());
40 attribute.getOwnerElement().setIdAttributeNode(attribute, true);
41 } else if (SignatureConfirmation.VALUE_ATTRIB_NAME.equals(attribute.getLocalName())) {
42 sc.setValue(attribute.getValue());
43 } else {
44 super.processAttribute(xmlObject, attribute);
45 }
46 }
47
48 }