1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.wstrust.impl;
18
19
20 import org.opensaml.ws.wstrust.Challenge;
21 import org.opensaml.ws.wstrust.SignChallengeType;
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
31
32 public class SignChallengeTypeUnmarshaller extends AbstractWSTrustObjectUnmarshaller {
33
34
35 protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
36 SignChallengeType signChallengeType= (SignChallengeType) xmlObject;
37 XMLHelper.unmarshallToAttributeMap(signChallengeType.getUnknownAttributes(), attribute);
38 }
39
40
41 protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
42 throws UnmarshallingException {
43 SignChallengeType signChallengeType= (SignChallengeType) parentXMLObject;
44
45 if (childXMLObject instanceof Challenge) {
46 signChallengeType.setChallenge((Challenge) childXMLObject);
47 } else {
48 signChallengeType.getUnknownXMLObjects().add(childXMLObject);
49 }
50 }
51
52 }