1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.opensaml.ws.wssecurity.impl;
18
19 import org.opensaml.ws.wssecurity.EncodedString;
20 import org.opensaml.xml.XMLObject;
21 import org.opensaml.xml.io.MarshallingException;
22 import org.opensaml.xml.util.DatatypeHelper;
23 import org.w3c.dom.Element;
24
25
26
27
28 public class EncodedStringMarshaller extends AttributedStringMarshaller {
29
30
31 protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
32 EncodedString encodedString = (EncodedString) xmlObject;
33 if (!DatatypeHelper.isEmpty(encodedString.getEncodingType())){
34 domElement.setAttributeNS(null, EncodedString.ENCODING_TYPE_ATTRIB_NAME, encodedString.getEncodingType());
35 }
36 super.marshallAttributes(xmlObject, domElement);
37 }
38
39 }