1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.opensaml.ws.wssecurity.impl;
19
20 import org.opensaml.ws.wssecurity.Reference;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.UnmarshallingException;
23 import org.opensaml.xml.util.XMLHelper;
24 import org.w3c.dom.Attr;
25
26
27
28
29
30 public class ReferenceUnmarshaller extends AbstractWSSecurityObjectUnmarshaller {
31
32
33 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
34 Reference reference = (Reference) xmlObject;
35 String attrName = attribute.getLocalName();
36 if (Reference.URI_ATTRIB_NAME.equals(attrName)) {
37 reference.setURI(attribute.getValue());
38 } else if (Reference.VALUE_TYPE_ATTRIB_NAME.equals(attrName)) {
39 reference.setValueType(attribute.getValue());
40 } else {
41 XMLHelper.unmarshallToAttributeMap(reference.getUnknownAttributes(), attribute);
42 }
43 }
44
45 }