Wednesday, 9 November 2011

Lesson08-Notification Services

Downloads:
  1. Gmail IMAP SSL Certificate for  incoming mails
  2. Gmail SMTP SSL Certificate for outgoing mails
  3. Gmail Keystore containing IMAP and SMTP SSL Certificates
In order to setup Gmail notification services in SOA server, we first need to import SSL certificates. Though I’ve made them available in the Downloads section above, here are the steps to import one yourself.
OpenSSL is required to import SSL certificates from google website. If you already have one, please ignore the installation section.
OpenSSL Installation
  1. Install Visual C++ 2008 Redistributables.
  2. Install OpenSSL from here.
Import Certificates
  1. Open command prompt and go to OpenSSLHome/bin.
  2. Run following commands to create SSL certificates. Ignore any reported errors. If command hangs, press Ctrl+C to cancel. This will have no impact on certificate import.
    • openssl s_client -connect imap.gmail.com:993 > imap.cert
    • openssl s_client -connect smtp.gmail.com:465 > smtp.cert
  3. Edit imap.cert and smtp.cert to remove everything before
    • Everything before —–BEGIN CERTIFICATE—–
    • Everything after —–END CERTIFICATE—– image
  4. Import above two certificates into keystore. Enter your choice of password when prompted for a new and confirmation password. You can find keytool executable from JAVA_HOME/bin either in standalone JDK6 or JDEV_HOME/jdk160_18\bin.
    • keytool -import -alias imap.gmail.com -keystore gmailcertstore.jks -file imap.cert
    • keytool -import -alias smtp.gmail.com -keystore gmailcertstore.jks -file smtp.cert
  5. Modify setDomainEnv.cmd from WLS_HOME/user_projects/domains/<soadomain>/bin to specify truststore.
    • -Djavax.net.ssl.trustStore=<path>/gmailcertstore.jks  -Djavax.net.ssl.trustStorePassword=<password you used>
  6. Save setDomainEnv.cmd
Configure UMS (User Messaging Service)
Login to Weblogic Enterprise Manager and open Workflow Notification Properties from SOA>soa-infra>SOA Administration.
image
Set Notification Mode as Email. Enter your choice of From, Actionable and ReplyTo email addresses.
image
Click on Go to the Message Driver page. From Associated Drivers page, click on Configure Driver.
image
Modify Driver properties as follows:

MailAccessProtocol IMAP
ReceiveFolder Inbox
OutgoingMailServer smtp.gmail.com
OutgoingMailServerPort 465
OutgoingMailServerSecurity SSL
OutgoingUsername Your choice of email id. Ex: orafmwtraining@gmail.com
OutgoingPassword Password for OutgoingUsername
IncomingMailServer imap.gmail.com
IncomingMailServerPort 993
IncomingMailServerSSL select checkbox
IncomingMailIDs saileshan007@gmail.com
IncomingUserIDs saileshan007@gmail.com
IncomingUserPasswords Password for IncomingUserID
Restart SOA Server.

No comments:

Post a Comment