Mittwoch, August 17, 2005
Output BPEL-Variable to OutputStream
Here is an example to write any BPEL-Variable to System.out or any other stream:
<bpelx:exec import="org.w3c.dom.*"/>
<bpelx:exec import="javax.xml.parsers.*"/>
<bpelx:exec import="javax.xml.transform.*"/>
<bpelx:exec import="javax.xml.transform.dom.*"/>
<bpelx:exec import="javax.xml.transform.stream.*"/>
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer= transformerFactory.newTransformer();
PrintStream outStream = System.out;
Result output = new StreamResult(outStream);
DOMSource source = new DOMSource((org.w3c.dom.Node) getVariableData("ReceiveFromRMRFileEvent_Read_InputVariable","RMR"));
transformer.transform(source,output);
<bpelx:exec import="org.w3c.dom.*"/>
<bpelx:exec import="javax.xml.parsers.*"/>
<bpelx:exec import="javax.xml.transform.*"/>
<bpelx:exec import="javax.xml.transform.dom.*"/>
<bpelx:exec import="javax.xml.transform.stream.*"/>
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer= transformerFactory.newTransformer();
PrintStream outStream = System.out;
Result output = new StreamResult(outStream);
DOMSource source = new DOMSource((org.w3c.dom.Node) getVariableData("ReceiveFromRMRFileEvent_Read_InputVariable","RMR"));
transformer.transform(source,output);