Encode XML-data as an attribute

Brent Putman putmanb at georgetown.edu
Mon Apr 2 16:57:29 BST 2012



On 4/1/12 6:36 AM, Rickard Bellgrim wrote:
> Anyone knows how you create this XMLObject and add it to the attribute?

Scott already commented on the advisability of doing this.  The actual
technical answer to your question is:  XMLObject is defined by the
OpenSAML library, so creating and working with XMLObjects means working
with the OpenSAML API.  The user's manual is here:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUserManual



In particular, the mechanism for instantiating new objects is here:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaCreateFromScratch


The really correct way to do the above would be to implement XMLObject
providers for your XML schema.  See the developer's guide for that:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoDeveloperManual


However, a somewhat quicker and dirtier approach would be to use the
XSAny provider, which can represent any content model.  Some examples of
that are here:

https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaAnyTypes


--Brent



More information about the users mailing list