Oracle Sales Cloud



Janrain’s integration with the Oracle Sales Cloud enables customer acquisition through an accelerated Registration conversion with Social Login, allowing you to capture rich customer profile data that can be gathered and stored and used to drive sales and marketing efforts.

The Janrain-Oracle Web connector application is a collection of web services that transfers information about new or updated customer profiles from the Janrain REST API to the Oracle Sales Cloud.


Figure 1: Sending Leads from Janrain to Oracle Sales Cloud


1. Janrain Registration application

If you don’t have one already, contact Janrain for a Registration solution.

Note: A webhook from Janrain tied to this Registration solution will be needed, but not until a URL for your web application is obtained. Testing can be carried out without the webhook.

2. Web page containing a Janrain Registration widget

Any page containing your Registration widget will work. This is needed for webhook operation.

3. Oracle user account

A free account is needed to download JDeveloper. To create an account (or sign in), go to and click Sign-in/Register.

4. JDeveloper

JDeveloper is a free, integrated development environment from Oracle. You can download JDeveloper here. Follow these instructions to install and configure JDeveloper.

5. Oracle Cloud instance

Register at

6. Oracle Fusion applications access

This came with your subscription and lets you see any leads you created.

7. Oracle Web Services URLs

Needed to create proxy clients to the Oracle Sales Cloud. The services needed are:

These URLs point to WSDL documents and have the form:

Configuration Steps

1. JDeveloper installation

Oracle recommends installing JDeveloper on 64-bit Windows. We do not recommend installing JDeveloper on other operating systems. For instructions on installing and configuring JDeveloper, refer to Oracle’s JDeveloper Installation page.

2. Start JDeveloper and create a new application

  1. Start JDeveloper.
  2. In JDeveloper, click New Application.
  3. Name the application “JanrainOracle” or “Your Name and Oracle”.
  4. Select Fusion Web Application (ADF) as the application type and click Ok.
  5. Two new projects are created named Model and ViewController.
  6. Add a new generic project to the application and name it “LocationServiceProxy”.
  7. Add a new generic project to the application and name it “SalesPartyServiceProxy”.
  8. Add a new generic project to the application and name it “SalesLeadServiceProxy”.

3. Add Oracle Web Service clients

There are three web proxy clients to be constructed, each using the JDeveloper wizard. Each proxy client is placed in a separate project. The code generated through the wizard must be amended to work in this application. Re-running the wizard afterward erases any amendments. What follows is applicable to all three clients, although we will use the Location Service in our example.

a. Right-click on the project name (Location, SalesParty, or SalesLead) and select New.

b. In the New Gallery dialog, select Business Tier > Web Services > Web Service Proxy, and click OK. The following screen is displayed:

fig 12 - Proxy Wizard Welcome

Figure 1: Web Service Proxy Wizard, Welcome Page

c. Click Next.

fig 13 - Proxy Wizard WDSL empty

Figure 2: Web Service Proxy Wizard, Select a WSDL Document

d. Enter the location of the WSDL file. See the following example.

fig 14 - Proxy Wizard WDSL with Example WDSL (not valid)

Figure 3: Web Service Proxy Wizard, Select a WSDL Document (file location entered)

e. The actual URL is based on your cloud instance. Click Next.

fig 15 - Proxy Wizard Default Mapping Options

Figure 4: Web Service Proxy Wizard, Specify Default Mapping Options

f. Enter “” for the Package Name and unselect the Generate as Async option. The screen should look like the previous one.

g. Click Next.

fig 16 - Proxy Wizard Endpoints

Figure 5: Web Service Proxy Wizard, Port Endpoints

h. Click Next.

fig 17 - Proxy Wizard Asynchronous Methods

Figure 6: Web Service Proxy Wizard, Asynchronous Methods

i. Select Don’t generate any asynchronous methods and click Next.

fig 18 - Proxy Wizard Policy

Figure 7: Web Service Proxy Wizard, Policy

j. Select oracle/wss_username_token_over_ssl_client_policy and leave the other options unselected. Click Next.

fig 19 - Proxy Wizard Defined Handlers

Figure 8: Web Service Proxy Wizard, Defined Handlers

k. Click Next. The final screen is displayed.

fig 20 - Proxy Wizard Finish

Figure 9: Web Service Proxy Wizard, Finish

l. Click Finish. Repeat this process for the remaining WSDL URLs. Many more files will appear in the Application Navigator.

4. Set certificate keystore path

In order for the REST API class method Send to work, a valid certificate for your target REST endpoint must be used.

  1. From the Main menu, select Tools /Preferences /HTTPAnalyzer /HTTPS Setup.
  2. For the field Client Trusted Certificate Keystore, click Browse.
  3. From the list, select cacerts.
  4. Click OK.

5. Modify the Oracle proxy service clients

Open the Connector.Jar file and extract the contents.

6. Add Servlet class

  1. From the Main menu, select File > New > Web Tier > Servlets.
  2. Select HTTP Servlet, then click Next.
  3. Set the class name to “Webhook”.
  4. Set the Generate Content Type to HTML.
  5. Select both doGet and doPost, and click Next.
  6. Leave the mapping information alone and click Finish.
  7. Double-click Webhook java to view the contents.
  8. Replace the contents of with the contents of from the JAR file.

7. Add JSON parsing class

  1. From the Main menu, click on file /New/General/Java.
  2. Select Java Class, then click Next.
  3. Set the class name to “JSONParse”, then click Ok.
  4. Replace the contents of with the contents of from the JAR file.
  5. Replace the existing webhook hash code(s) with hash codes from your webhook configuration and update the IF statement to match the number of codes. See Code Sample 1 for more information.
  6. If previously commented out for servlet test, remove comment tags from around the references to the JSONParse class in the Webhook class.

8. Add REST API calling class

  1. From the Main menu, click on the file /New/General/Java.
  2. Select Java Class and click Next.
  3. Set the class name to “RESTApi” and click Ok.
  4. Replace the contents of with the contents of from the JAR file.
  5. Modify the Send method to reflect your actual capture endpoint URL, your client ID, and your client secret. See Code Sample 2 for more information.

9. Add Mapping class

  1. From the Main menu, click the file /New/General/Java.
  2. Select Java Class and click Next.
  3. Set the class name to “Mapper” and click Ok.
  4. Replace the contents of with the contents of from the JAR file.

10. Deploying to Java Cloud Services (JCS)

Before deploying to an external server, deploy the individual projects of the application to their individual JAR or WAR file. LocationServiceProxy, SalesPartyServiceProxy, and SalesLeadServiceProxy all must be deployed as JAR files. Deploy ViewController as a WAR file.

There are two ways to deploy to JCS:

Deploying from within JDeveloper

  1. Right-click on the application name and select Deploy. At this point, if there is a numbered option for a connector used for the Oracle Cloud, use it and you are done. If not, continue with the following steps to create one.
  2. Select the name of the application at the top of the list.
  3. On the next screen, select Deploy to Application Server.
  4. On the next page, make sure that the Overwrite box is selected (this will ensure the old code is deleted before the new code is added).
  5. Click ‘+‘ to add a new connection.
  6. Give the connection a name that explains its purpose.
  7. For the connection type, select Oracle Cloud.
  8. Supply the Username and Password you use to log in to Oracle Cloud.
  9. Select the Data Center and add the Identity Domain and Service Name. These values were sent to you, but if you need to find them, the Identity Domain is on the login page for Oracle Cloud, and the Service Name is located on the Oracle Cloud console as the Service Instance.
  10. If you see a connection failure, recheck your credentials. You may need to download the latest Oracle-JavaCloud SDK.

11. Testing

Once your application is successfully deployed to JCS, you can test it. A simple way to test is to use a cURL message (PHP or command-line).

An example of a command-line cURL post is:

12. Get a Janrain webhook

Contact Janrain for a Registration application webhook. For more information, refer to Webhooks.

Code Samples

Code Sample 1

The following code sample is a section of the JSONParse class that needs to be customized to work for you. The parts to be customized are highlighted below.

You will need to know all of the hash codes that were set up in the webhook configuration file. These codes add a layer of confidence that the JSON post to the servlet is from Janrain.

Code Sample 2

The following code sample is a section of the RESTApi class that needs to be customized to work for you. The parts to be customized are highlighted below.
You will need to know your Registration application name, the client ID code, and the client secret code.