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 import org.opensaml.ws.wstrust.RequestSecurityToken;
20 import org.opensaml.xml.XMLObject;
21 import org.opensaml.xml.io.MarshallingException;
22 import org.opensaml.xml.util.XMLHelper;
23 import org.w3c.dom.Element;
24
25
26
27
28
29 public class RequestSecurityTokenMarshaller extends AbstractWSTrustObjectMarshaller {
30
31
32 protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
33 RequestSecurityToken rst = (RequestSecurityToken) xmlObject;
34 if (rst.getContext() != null) {
35 domElement.setAttributeNS(null, RequestSecurityToken.CONTEXT_ATTRIB_NAME, rst.getContext());
36 }
37
38 XMLHelper.marshallAttributeMap(rst.getUnknownAttributes(), domElement);
39 }
40
41 }