Sometimes its required for us to read the file using file adapter and then send it as an email attachment. When the file is read by DB adapter in binary format, means as an opaque type variable then the data is in the encoded format.
When we send the email in the attachment we have to add the original file contents as a string.
So, we have to decode the content usingbase64 then attache it to the email activity.
To send the email as anattachment then below are the three key steps we need to do.
1. Import thejava classes in the bpel file, as the sub element of ...
<process> element.When we send the email in the attachment we have to add the original file contents as a string.
So, we have to decode the content using
To send the email as an
1. Import the
<
2. Create a simple string type
;
<
;
3. Assign the input variable's opaque value to the string variable, to ma
;
<
<
<
eCo
nte
nt
<
t;
</
4.
e.
sta
rte
d"
;
oracle.soa.common.util.Base64Decoder Decoder = new oracle
{
String decoded = oracle.soa.common.util.Base64D
ed)
;
}
xcepti
on e)
{
}
5.
In the encoding you can add manual
6. Here is the sample BPEL flow you can see for testing.
Now compile and test it. Thats it.
No comments:
Post a Comment