Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

converting base64Binary to PDF in BPEL 10.3.1

777966Jun 8 2010 — edited Feb 26 2020
I receive a PDF as input to my BPEL process in base64Binary format. I have to convert it back to PDF and post it to a folder. I tried applying this code in 'Java Embedding' process, but is not working. Can you please take a look and suggest what am I doing wrong?

I am able to compile the code successfully but it gets stuck at java_embedding process during runtime.

Thank you.
Karan

<bpelx:exec import="java.util.*"/>
<bpelx:exec import="java.io.*"/>
<bpelx:exec import="java.lang.*"/>
<bpelx:exec import="java.math.*"/>
<bpelx:exec import="java.net.*"/>
<bpelx:exec import="com.collaxa.common.util.Base64Decoder"/>
<bpelx:exec import="com.collaxa.common.util.Base64Encoder"/>

String inputString =(String)getVariableData("input");
Base64Decoder Decoder = new Base64Decoder();
FileWriter outputStream = null;
try {
String decoded = Base64Decoder.decode(inputString);
//setVariableData("outputString",decoded);
outputStream = new FileWriter("E:\\output\\outputFile.pdf");
outputStream.write(decoded);
if (outputStream != null) {
outputStream.close();
}
}
catch(UnsupportedEncodingException uee) {
uee.printStackTrace();
}
catch (IOException e) {
System.err.println("Caught IOException: " + io.getMessage());
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2011
Added on Jun 8 2010
1 comment
1,095 views