<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal style='text-align:justify'><span lang=DE style='font-family:"Courier New"'>I am trying to create a AttributeStatement containing an Attribute from an LDAP server source using the OpenSAML 2.0 libraries. Below is an example of what I am trying to create:<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span lang=DE style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:justify;text-indent:.5in'><span lang=DE style='font-family:"Courier New"'><saml:AttributeStatement><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> <saml:Attribute<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in;text-align:justify;text-indent:.5in'><span style='font-family:"Courier New"'>xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.5in;text-align:justify'><span style='font-family:"Courier New"'>attribute:X500" x500:Encoding="LDAP"<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> NameFormat="urn:oasis:names:tc:SAML:2.0:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in;text-align:justify;text-indent:.5in'><span style='font-family:"Courier New"'>attrname-format:uri"<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> Name="urn:oid:1.3.6.1.4.1.1466.115.121.1.26"<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> FriendlyName="mail"><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> <saml:AttributeValue<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.5in;text-align:justify;text-indent:.5in'><span style='font-family:"Courier New"'>xsi:type="xs:string"><o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.5in;text-align:justify;text-indent:.5in'><span style='font-family:"Courier New";color:#993366'><a href="mailto:johndoe@gmail.com">johndoe@gmail.com</a><o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in;text-align:justify;text-indent:.5in'><span style='font-family:"Courier New"'></saml:AttributeValue><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'> </saml:Attribute><o:p></o:p></span></p><p class=MsoNormal style='text-align:justify;text-indent:.5in'><span style='font-family:"Courier New"'></saml:AttributeStatement><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Below is my current source code for producing the AttributeStatement, Attribute, and AttributeValue.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> // AttributeValue<o:p></o:p></p><p class=MsoNormal> XMLObjectBuilder t_AttributeValueBuilder = (XMLObjectBuilder)t_XMLObjectBuilderFactory.getBuilder(XSString.TYPE_NAME);<o:p></o:p></p><p class=MsoNormal> XSString t_AttributeValue = (XSString)t_AttributeValueBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSString.TYPE_NAME);<o:p></o:p></p><p class=MsoNormal> t_AttributeValue.setValue("<a href="mailto:bob@malone.edu">bob@malone.edu</a>");<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> // Attribute<o:p></o:p></p><p class=MsoNormal> AttributeBuilder t_AttributeBuilder = (AttributeBuilder)t_XMLObjectBuilderFactory.getBuilder(Attribute.DEFAULT_ELEMENT_NAME);<o:p></o:p></p><p class=MsoNormal> Attribute t_Attribute = t_AttributeBuilder.buildObject();<o:p></o:p></p><p class=MsoNormal> t_Attribute.setFriendlyName("mail");<o:p></o:p></p><p class=MsoNormal> t_Attribute.setName("urn:oid:1.3.6.1.4.1.1466.115.121.1.26");<o:p></o:p></p><p class=MsoNormal> t_Attribute.setNameFormat("urn:oasis:names:tc:SAML:2.0:attrname-format:uri");<o:p></o:p></p><p class=MsoNormal> t_Attribute.getAttributeValues().add(t_AttributeValue);<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'> AttributeStatementBuilder t_AttributeStatementBuilder = AttributeStatementBuilder)t_XMLObjectBuilderFactory.getBuilder(AttributeStatement.DEFAULT_ELEMENT_NAME);<o:p></o:p></p><p class=MsoNormal> AttributeStatement t_AttributeStatement = t_AttributeStatementBuilder.buildObject();<o:p></o:p></p><p class=MsoNormal> t_AttributeStatement.getAttributes().add(t_Attribute);<o:p></o:p></p><p class=MsoNormal> t_Assertion.getAttributeStatements().add(t_AttributeStatement);<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am not sure how to add the following XML attributes to the Attribute element:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'>xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500"<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'>x500:Encoding="LDAP"<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>Does anyone know how to handle this in the OpenSAML 2.0 library?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any assistance you can offer would be greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thank you.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b><span style='font-family:"Georgia","serif"'>Shawn Campbell<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Systems Analyst<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Information Technology Offices<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Phone: 330.471.8501<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Fax: 330.471.8302<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>E-mail: <a href="scampbell@malone.edu">scampbell@malone.edu</a><o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";color:black'><img border=0 width=215 height=108 id=e242b24e-9fcb-4b6b-9150-36863c8295ff src="cid:image001.png@01CEE479.D01EFAB0" alt="cid:43D3B185-AF75-4CFC-A291-D4EE889CFB31@malone.int"></span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Malone University<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>2600 Cleveland Avenue NW<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'>Canton, Ohio 44709<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Georgia","serif"'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>