Use HTML Content with UMS Adapters in OSB 12c

November 27, 2016

Reading time ~1 minute

In this post, we will learn how to send html content for the emails using a UMS adapter in OSB 12c. There we go:

Pre-requirements

First, we need to verify that we have the UMS adapter and the email driver already working. These configurations are in the previous post Using UMS Adapter to send emails with OSB 12c.

Steps

So first we have to edit the UMS adapter and go to the step 5, Set the option “Message is Opaque (Base64Binary)”

Now, we need to encode the information to Base64 and use use it in the businees service. To accomplish this task we could use a Java callout and use it to encode the information. I have created a Jar file that encode and decode as Base64 and you can download it here.

Extract the jar library and import into the SB Project

.

Create a Java Callout in the pipeline and use the Jar file called decodejarfile.jar as the image bellow.

.

Select the method encode from sysco.binary64.Base64Encoder as the following image.

Create a sample html content in the input.

And set a output parameter, let say htmlEncodedContent

Replace the content body with the request of the UMS business service as the image bellow.

Finally, go to routing and include a transport header. Add the following header field name “jca.ums.part.content-type” and the value ‘text/html; charset=utf-8’ as the image bellow.

This setting will be used to handle html content in the email.

Deploy changes and enjoy sending email with HTML content. Good luck!

Christopher is part of middleware Sysco. He is CTO of his own startup in South America. He was working with differents open source solutions. Also He was participating in several programming tournaments related to algorithms of Computer Science. Actually these last years, he gained experience with Oracle MAF, ADF ,OSB and other Oracle solutions.

Service call with multiple levels of security in OSB 12c

![Client Certificate security implementation](/images/2017-09-27-Service-call-with-multiple-levels-of-security-in-OSB-12c/HTTP_GET_Securi...… Continue reading

Apache Kafka workshop

Published on September 26, 2017