So the easiest way to remedy this problem is to create a embedded java in your BPEL to convert your variable to a string. This post is designed to walk you through that.
First we need to import the Binary encoder so right before all of the partnerlinks in our BPEL document we will want to add this import (This is for Oracle BPEL and the class maybe different for other flavors)
or
Depending on the direction you want to go.
Ok now we have our import now we need to create a variable to house our encoded string, I used...
Finally we will create our embedded Java, here is what mine looks like I encoded my string decoding would be similar.
String input = (String)getVariableData(
Base64Encoder Encoder = new Base64Encoder();
try
{
String encoded = Base64Encoder.encode(input);
setVariableData("EncodedMessage",encoded);
}
catch(Exception ex)
{
ex.printStackTrace();
}
my
Then I use an assign to assign the variable to the native payload.
No comments:
Post a Comment