com.collaxa.common.util.Base64Decoder does not compile in 11g
726049Nov 2 2009 — edited Feb 26 2020How do I add com.collaxa.common.util to my class path so I can compile my Java embedded code block? I am using Oracle BPEL 11g the code worked in the 10g world.
I am trying to decode a Base 64 encoded message to an ascii format using a Java embedded code block. I am using the same code that worked in the Oracle BPEL 10g but in the 11G environment I am having problems compiling.
The problem is I do not have the com.collaxa.common.util in my class path. This results in the following error
Error: cannot find symbol symbol : class Base64Encoder
location: package com.collaxa.common.util
I am also having problems with all the following packages
<bpelx:exec import="com.collaxa.common.util.Base64Decoder"/>
<bpelx:exec import="org.apache.commons.codec.binary.Base64"/>
<bpelx:exec import="oracle.ldap.util.Base64"/>
The code that I am using is as follows:
<!-- Activate the Java_ConvertBase64PayloadToString bpel section to
Convert the Base64 payload to a string
-->
<bpelx:exec import="java.lang.*"/>
<bpelx:exec import="java.rmi.RemoteException"/>
<bpelx:exec import="javax.naming.NamingException"/>
<bpelx:exec import="org.w3c.dom.Element"/>
<bpelx:exec import="com.collaxa.common.util.Base64Decoder"/>
<bpelx:exec import="com.collaxa.common.util.Base64Encoder"/>
<bpelx:exec import="java.io.UnsupportedEncodingException"/>
<bpelx:exec import="com.oracle.bpel.client.BPELFault"/>
<bpelx:exec name="Java_Embedding_1" version="1.5" language="java">
<![CDATA[
/*
Base64Binary_Payload : stores the Base64 message payload
String_Payload : Stores the converted String message payload
*/
try {
// messagePayload is a Base64 type, contains the message payload
String messagePayload = (String)getVariableData("Base64Binary_Payload");
// decode the message
byte[] decodedBytes = Base64Decoder.decode(messagePayload.getBytes());
String decoded = new String(decodedBytes);
// set gloabal variable
setVariableData("String_Payload",decoded);
}
catch (BPELFault e) {
e.printStackTrace();
}]]>