Tuesday, June 23, 2015

#408 First steps with the Cloud App adapters and the Cloud Adapter SDK - Installation

Download the software from here -

BTW. I am installing this on top of SOA 12.1.3 BP1

Download the 3 files specified -

I unzip the first of the apps files -

I unzip the second -

Install the relevant version for your O/S.

Specify your SOA 12c BP1 Home -

Unzip the cloud-adapters zip -

Follow the instructions in the README -

Essentially install 20680367 and then 20780464.

Re-start JDeveloper -

Note the Cloud adapters available -

Post-Install Steps

For Security setup etc. for specific app adapters, please see the following doc

That doc also has some general post-install steps , you need to execute.

The first step is to deploy the cloudsdk.ear to weblogic.

This file can be found here -

I now need to grant permissions to access the credential store.
This will be required when the adapter needs to authenticate with the
SaaS app.

I need to grant this permission to the jca-binding.jar file.

First step, find the file - where name includes jca

Then check the box -

This is what we need to add -
  • Permission Classoracle.security.jps.service.credstore.CredentialAccessPermission
  • Resource Namecontext=SYSTEM,mapName=oracle.wsm.security,keyName=*
  • Permission Action*

The Result -

You can now proceed to create csf-keys for your SaaS apps.

I have a demo cloud app, running on weblogic,
so I enter the following data -

Now, say I want to connect to Service Cloud, Sales Cloud etc.

I would also need to import the certificate.

Here is an example for ServiceCloud (RightNow).
Btw. I have already downloaded the cert from my browser.

I also add a CSF-Key for ServiceCloud(RightNow)

If your wsdls are ca certified, then you need to update 

the setDomainEnv file as follows -

search the file for "truststore" and edit as follows -

Original is -

set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dsoa.archives.dir=%SOA_ORACLE_HOME%\soa -Dsoa.oracle.home=%SOA_ORACLE_HOME% -Dsoa.instance.home=%DOMAIN_HOME% -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=%WL_HOME%\server\lib\DemoTrust.jks -Doracle.xml.schema\Ignore_Duplicate_Components=true -Doracle.xdkjava.compatibility.version=11.1.1 -Doracle.soa.compatibility.version=11.1.1

Change the entry highlighted to -

set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dsoa.archives.dir=%SOA_ORACLE_HOME%\soa -Dsoa.oracle.home=%SOA_ORACLE_HOME% -Dsoa.instance.home=%DOMAIN_HOME% -Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true  -Djavax.net.ssl.trustStore=kss://system/trust -Djavax.net.ssl.trustStoreType=kss -Doracle.xml.schema\Ignore_Duplicate_Components=true -Doracle.xdkjava.compatibility.version=11.1.1 -Doracle.soa.compatibility.version=11.1.1

Configure the Proxy Server for Runtime Use 

Edit setDomainEnv again -

Add the following line to EXTRA_JAVA_PROPERTIES:
-Dhttp.proxyHost=www-proxy.us.company_name.com -Dhttp.proxyPort=80
-Dhttps.proxyHost=www-proxy.us.company_name.com -Dhttps.proxyPort=80

Where company_name is your company name.

Restart the server.

Testing a demo Cloud Adapter

The demo cloud adapter will provide connectivity to the demo cloud app.

I deploy my demo cloud app, this will be my sample SaaS app that allows me to
execute CRUD commands on some basic business objects, such as Account.
It is essentially a simple synchronous service, deployed to my local weblogic instance.

I then need to deploy the demo cloud adapter, that will provide connectivity to the aforementioned SaaS app. The adapter file is mycloudadapter.jar
Firstly, I need to deploy to the design time.

I do this by copying it to the /dropins directory

Then, I need to deploy the same jar for runtime -
I do this by copying it to the /soa/soa/modules/oracle.cloud.adapter_12.1.3 directory

I need to edit the setDomainEnv file again, in order
to add this jar to the POST_CLASSPATH variable.

set POST_CLASSPATH=D:\Work\envs\CloudAdapterSdk\soa\soa\modules\oracle.cloud.adapter_12.1.3\mycloudadapter.jar;%POST_CLASSPATH%

Then I restart the server.

Create a Composite that leverages the demo adapter

As you can see, MyCloudAdapter is now available in the component palette.

I now leverage this adapter in a simple composite -

Here I am simply creating an Account.

Naturally, I specify the key defined earlier.
This info is contained in the relevant .jca file in the JDev project.

I deploy

I want to test, but note, the Test button in em is disabled -

However, I can test it over the following url -

https://localhost:7102/integration/flowsvc/mycloudadapter/default/CATest/MycloudadapterService/v1.0/?WSDL using SOAP-UI, for example.

Note the makeup of the URL -


I execute the test - all the BPEL process does is essentially echo back the accountID.

This excellent demo, written by colleagues, has a UI component that allows me to browse the "cloud" app's
business objects -

Mine is the Irish entry, last, but not least, on the list.

Looks good!

Monday, June 22, 2015

#407 ICS Basic Components and some sample integrations to get you started!


ICS is simple - checkout the design screen functionality -

So what are all of these?

Connections to cloud and on-prem apps you need to integrate.
Integrations connect two apps and define how they interact - e.g. data mappings etc.
Dashboard is used by the admin to monitor what's going on.

Lookups are a bit like DVMs (Domain Value Maps). AppA has state as CA, AppB expects
California. The Lookup provides us with this functionality.

Packages are simply containers for related integrations and artifacts.

So how about a simple example?

Simple Example

Here I create a SOAP connection to a public web service -

Here I see the definition and can edit the connection
and security properties.

Test -

Once tested, the connection progress icon is at 100%

Now I will create an integration that leverages the connection.

We are offered some patterns -

Map My Data - is the basic pattern you select for connecting A to B.
Publish to ICS - publishes your message to your ICS Messaging Cloud instance.

Subscribe to ICS - subscribes to a selected published message type.

I select Map My Data.

Note the connections on the right - 

I now drag and drop The NiallCStockService to the Source icon on the left.

Click Next and select the port -

What we have just created is essentially the web service interface to the integration flow.

I now drag/drop the stock service to the Target node as well.

The target SOAP Service is the actual web service endpoint – typically you use SOAP Services to connect to SaaS or on-premises applications with which you want to integrate.

Now all we need to do is the relevant request mapping -


Now Map the Response -

I now add tracking to the source based on the StockSymbol entered -


All we now need to do is Activate -

Now I will test using SOAP-UI -
first the wsdl, it is available here -

Mine is -
I create a new project in SOAP-UI based on this wsdl.

Enter a valid stock symbol and test -

SalesCloud 2 ServiceCloud Example

Here I create an integration between RightNow ServiceCloud and Oracle Sales Cloud

The functional background is I want to retrieve Incidents from ServiceCloud for a particular
organization in OSC.

Create the ServiceCloud Connection -

I click on the Connection icon and see -

I click Create New Connection

Now I see a list of Cloud apps, some from ORCL others, such
as Salesforce, from third parties. Note also the two "tech adapters"
for REST and SOAP.

I select Oracle RightNow and enter the new connection information -

I click Create and see -

I now add the wsdl url, by clicking on Configure Connectivity -

Note: I have deleted my server name from the screenshot above!

I then click on Configure Credentials -

Nearly there, now I click on the Test icon -

Create the SalesCloud Connection -

Configure Connectivity -

Note the 2 properties above. OSC supports event propagation e.g. new sales opportunity created.
The Events Catalog URL is optional.

I then Configure Credentials.

I test the connection.

Create an Integration with OSC as Source and ServiceCloud as Target

Source - 

Target -

Note: I am using ROQL (RightNow Object Query Language)
to retrieve the incidents for a particular orgId.

I also have a test option in the dialogue -

First, I check for an Organization with Incidents in ServiceCloud.

So here is my org - Org 35.
It has incidents -

Now to the orgId, our search value - here it is -

So now I test my ServiceCloud target with the orgId 472 -

Note: The Incident Id returned is 280.

Create the Request/Response Data Mapping

Request -

Let's look at my request mapping -
It is very simple - I am mapping the PartyId of the OSC Account
object to the orgId of my search parameters.

Note: We only see the mapped fields in the target.
This is because I have applied a Filter -

Response -

This is somewhat more complex -

firstly, I use a for-each XSL element, as I may have many incidents to return -

I then map the Incident Id, as shown above.


That's it, then I test using SOAP-UI, for example.

Request -

Response -

Note: There's our Incident Id - 280.

I will cover enrichment in future posts.