<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 6/11/15 1:23 AM, Surinaidu Majji
wrote:<br>
</div>
<blockquote
cite="mid:CAGNcRLQVPeNeL_QRo=G7Pa2dG3pWah8fnCCQBFzcFY-ETdeJcw@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<div>A) base64 encoding/decoding packages in OpenSAML 3.1.1 (as
highlighted below in red)
<div>B) XML helpers to convert DOM to Strings (as highlighted
below in red)</div>
<div><br>
</div>
<div>
<div><span class="" style="white-space:pre"> </span>authDOM
= marshaller.marshall(authnRequest); // converting to a
DOM</div>
<div><span class="" style="white-space:pre"> </span>StringWriter
requestWriter = new StringWriter();</div>
<div><span class="" style="white-space:pre"> </span><font
color="#ff0000">XMLHelper.writeNode(authDOM,
requestWriter); </font><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
See java-support,
net.shibboleth.utilities.java.support.xml.SerializeSupport. One of
the nodeToString(...) or writeNode(...) methods.<br>
<br>
<br>
<br>
<br>
<blockquote
cite="mid:CAGNcRLQVPeNeL_QRo=G7Pa2dG3pWah8fnCCQBFzcFY-ETdeJcw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div><span class="" style="white-space:pre"> </span><br>
</div>
<div><span class="" style="white-space:pre"> </span>encodedRequestMessage
=<font color="#ff0000">Base64.encodeBytes(requestMessage.getBytes(),Base64.DONT_BREAK_LINES);</font><br>
</div>
</div>
<div><br>
</div>
</div>
</div>
<br>
</blockquote>
<br>
<br>
Again java-support,
net.shibboleth.utilities.java.support.codec.Base64Support.<br>
<br>
<br>
Although: I don't necessarily want to open a can of worms, but if
what you're actually doing is trying to do is serialize and encode
the data in order to implement SAML binding(s), we have higher level
components in both v2 and v3 that do all that for you. In v3 for
SAML 2, look at the MessageEncoder impls in the saml-impl module,
package org.opensaml.saml.saml2.binding.encoding.impl. For usage
examples, take a look at the unit tests for those. It's not
difficult.<br>
<br>
<br>
<br>
</body>
</html>