1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.opensaml.saml2.core.impl;
22
23 import org.opensaml.saml2.core.Assertion;
24 import org.opensaml.saml2.core.EncryptedAssertion;
25 import org.opensaml.saml2.core.Response;
26 import org.opensaml.xml.XMLObject;
27 import org.opensaml.xml.io.UnmarshallingException;
28
29
30
31
32 public class ResponseUnmarshaller extends StatusResponseTypeUnmarshaller {
33
34
35 protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
36 throws UnmarshallingException {
37 Response resp = (Response) parentSAMLObject;
38
39 if (childSAMLObject instanceof Assertion) {
40 resp.getAssertions().add((Assertion) childSAMLObject);
41 } else if (childSAMLObject instanceof EncryptedAssertion) {
42 resp.getEncryptedAssertions().add((EncryptedAssertion) childSAMLObject);
43 } else {
44 super.processChildElement(parentSAMLObject, childSAMLObject);
45 }
46 }
47
48 }