1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.saml2.ecp.impl;
18
19 import org.opensaml.common.impl.AbstractSAMLObjectMarshaller;
20 import org.opensaml.saml2.ecp.Request;
21 import org.opensaml.xml.XMLObject;
22 import org.opensaml.xml.io.MarshallingException;
23 import org.opensaml.xml.util.XMLHelper;
24 import org.w3c.dom.Element;
25
26
27
28
29 public class RequestMarshaller extends AbstractSAMLObjectMarshaller {
30
31
32 protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
33 Request request = (Request) xmlObject;
34
35 if (request.getProviderName() != null) {
36 domElement.setAttributeNS(null, Request.PROVIDER_NAME_ATTRIB_NAME, request.getProviderName());
37 }
38 if (request.isPassiveXSBoolean() != null) {
39 domElement.setAttributeNS(null, Request.IS_PASSIVE_NAME_ATTRIB_NAME,
40 request.isPassiveXSBoolean().toString());
41 }
42 if (request.isSOAP11MustUnderstandXSBoolean() != null) {
43 XMLHelper.marshallAttribute(Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
44 request.isSOAP11MustUnderstandXSBoolean().toString(), domElement, false);
45 }
46 if (request.getSOAP11Actor() != null) {
47 XMLHelper.marshallAttribute(Request.SOAP11_ACTOR_ATTR_NAME,
48 request.getSOAP11Actor(), domElement, false);
49 }
50
51 }
52
53 }