Importing SSL certificates to Trust Keystore
As you would be using GMAIL, for incoming messages, you have to import gmail ssl certificates to weblogic trust store.
- Download the Gmail IMAP and SMTP certificates. This can be done with OpenSSL by running the following from command prompt:
openssl s_client -connect smtp.gmail.com:465
openssl s_client -connect imap.gmail.com:993
2. Copy the contents from –Begin Certificate– to –End Certificate– and create two text files as smtp.txt and imap.txt which contains certificates generated using openssl for SMTP and IMAP respectively.
3. Using Java Keytool, import the two certificates into trust store. You can create a new store. However we would use the exisitng DemoTrust.jks trust store. DemoTrust.jks trust store can be found at %WL_HOME%/server/lib/DemoTrust.jks and the keeytool is available @ %JAVA_HOME%/bin.
4. Use following command to import certificates to trust store-
keytool -import -alias AliasName -keystore KeystoreLocation -file CertificateLocation
For Our example use –
keytool -import -alias gmailimap -keystore C:\Oracle\Middleware\wlserver\server\lib\DemoTrust.jks -file imap.txt
keytool -import -alias gmailsmtp -keystore C:\Oracle\Middleware\wlserver\server\lib\DemoTrust.jks -file smtp.txt
5. Enter “DemoTrustKeyStorePassPhrase” when prompt for DemoTrust store password.
6. Start/Restart the SOA server.
Configure Email Driver on WebLogic Server
- Login to WebLogic server as admin user (weblogic)
- Expand User Messaging Service
- Right Click usermessagingdriver-email and click on email driver properties as shown below –
4. Choose message exchange protocol as – MailAccessProtocol = IMAP
5. ReceiveFolder = INBOX
6. Furnish following details for incoming email server,port and SSL.
7. Let the incoming mail id be email@example.com. You can change as per your requirements.
- Enter Email ID password as cleartext password in IncomingUserPasswords.
- Click Apply to Apply Changes.
- Right-click on soa-infra under SOA and navigate to the → SOA Administration → Workflow Notification Properties
- Set the Notification Mode to ‘Email’ and enter the values which you wish to use for from, actionable and reply to email addresses.
- Click Apply and Restart SOA server for changes to persist.
Create a SOA/BPEL process to send email to “firstname.lastname@example.org”
To initiate the Loan Origination BPM process, you have to send email to email@example.com’s INBOX as email driver is configured to pick messages from this box.
Download the Project – “PushToEmail” associated with this post.
- Open the project PushToEmail in Jdeveloper.
- Click on Composite.xml
- Open SendToEmail UMS adapter configuration
- It;s based on outbound JNDI – eis/ums/UMSAdapterOutbound
- Operation name defined is Outbound Send Notification
- Change following details as per your email configuration –
- Notice the To address. It;s the address of the Loan Office which would receive the email in his/her Inbox from where the BPM process would initiate.
- Choose LoanOrigination schema associate with this blog and let the configuration of UMS be based on LoanOrigination schema.
- Create the BPEL process with default input and output
- Drag and assign values to UMS adapter input variable
- Save and Deploy the process.