1. Create a static java method :
2. Create a XML Config file that will be added later to the OSB installation folder, mine is: vrsbrazil.custom.function.xml
3. Wrap your java project into a jar file and copy the jar file and the xml you just created into the following folder: [OSB_HOME]/config/xpath-functions
4. Start or restart your weblogic environment;
5. That´s it! Next you see how it is shown on the sbconsole XQuery editor:
Here is the source code: Source
Thank you for reading!