Another article "How to deploy Java classes with BPEL process" goes through the deployment process.
The System.out.println output can be found in the console.
Here is a sample code that outputs the request of type Element to an XML String.
Note : Debugging the problem is a time consuming activity.
try{
System.out.println("IN JAVA EMBEDDING*******************:");
org.w3c.dom.Element inputElement = (org.w3c.dom.Element)getVariableData("inputVariable","payload","/client:process");
System.out.println("*******************GOT THE ELEMENT:*******************");
String inputElementXML = com.collaxa.cube.xml.dom.DOMUtil.toXML(inputElement);
System.out.println("inputElementXML :" + inputElementXML);
setVariableData("outputVariable", "payload",
"/client:processResponse/client:result", inputElementXML);
}catch(Exception e){
System.out.println("Exception in Embedded Java:" + e.toString());
}