<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 4/21/15 10:02 AM, Cantor, Scott
wrote:<br>
</div>
<blockquote cite="mid:ED890B29-3FF0-4153-A788-048DC4AE8868@osu.edu"
type="cite">
<pre wrap="">On 4/21/15, 3:55 AM, "LECUYER, Dominic" <a class="moz-txt-link-rfc2396E" href="mailto:dominic.lecuyer@capgemini.com"><dominic.lecuyer@capgemini.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">My problem is the escaping of the characters.
</pre>
</blockquote>
<pre wrap="">
No, your problem is using "string" as a type to carry XML, that's not correct. You would have to construct an XMLObject tree and embed that as the value.</pre>
</blockquote>
<br>
Exactly.<br>
<br>
<blockquote cite="mid:ED890B29-3FF0-4153-A788-048DC4AE8868@osu.edu"
type="cite">
<pre wrap="">
But you really shouldn't, as Jeff indicated.</pre>
</blockquote>
<br>
<br>
Agree.<br>
<br>
<blockquote cite="mid:ED890B29-3FF0-4153-A788-048DC4AE8868@osu.edu"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">I am now thinking of how to create my own AbstractXMLObject extentions and factories but this seems to be excessive work with unsure results ^^.
</pre>
</blockquote>
<pre wrap="">
I believe you can use XSAny to construct any tree required if you wanted to, but I'm not really familiar. It's just a bad idea regardless.
</pre>
</blockquote>
<br>
<br>
Right. The 2 ways that you could do this are: 1) use XSAny and 2)
implement XMLObject provider impl(s) for the element(s) you need.<br>
<br>
XSAny would work ok if the element structure is relatively simple,
and all you need to do is *generate* this XML. There is an example
of this in the wiki, see near the bottom, the health role example:<br>
<br>
<a class="moz-txt-link-freetext" href="https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaAnyTypes">https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoUsrManJavaAnyTypes</a><br>
<br>
That's actually for v2, so you'd have to adjust a little for v3
(e.g. no Configuration class, etc), but the XSAny concepts are the
same.<br>
<br>
<br>
If you need to both generate and *consume* new element type(s), then
it's probably best to implement XMLObject impls for those. You can
technically use XSAny for consuming, but it's awkward.<br>
<br>
If you want to go the XMLObject impl route, you'd want to look at
the developer's guide:<br>
<br>
<a class="moz-txt-link-freetext" href="https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoDeveloperManual">https://wiki.shibboleth.net/confluence/display/OpenSAML/OSTwoDeveloperManual</a><br>
<br>
Again, that is for v2, and is probably even a little outdated for
v2, but the concepts are the same. Or if it's easier, just look at
some actual examples in the v3 OpenSAML project. You'd basically be
doing the same thing: for each element declare an interface, write
an impl and finally create the relevant
builder/marshaller/unmarshaller set which you then register with the
XMLObjectProviderRegistry.<br>
</body>
</html>