Monday, November 14, 2011

opaq:opaqueElement and base64Binary

If you want to write binary data to a FTP in OSB (or simply you want to avoid any nXSD transformation in your XML), you have the option of using


You should in this case base64-encode your payload.
The bad news is that in Xquery 1.0 there is not a function to base64encode

You can do a Java Callout or a Custom XPath to a Java function.

There are plenty of BASE64Encoder classes around... from the BEA WLI framework, from Sun, from Apache....

In fact, Sun implementation is not really an option.

We have identified the Apache Commons base64 encoder - in alternative to Sun implementation, since Sun (Oracle) itself recommends NOT to use sun packages - as the most commonly used encoder.

So, use this commons-codec-1.4.jar

No comments: