A bit impatient, perhaps?
Why do you need it on a single line?
Perhaps this works:
/usr/local/ssl/bin/openssl ... (without options -a, -out) ... | base64 -w 0 > out.xml
In other words, you don't ask openssl for the base64 encoding, but use the base64 command. Thanks to -w 0, there are no line breaks.