Thursday, 5 November 2015

How to Disable OSB Services in 12c (12.2.1.0.0)

Recently I got to work on OSB Suite 12c(12.2.1.0.0) and there was a scenario where I need to disable File Polling mechanism through OSB Console.

As in OSB Suite 11g this feature was provided under Operational settings Tab and uncheck the tick mark to Disable the State.

Whereas in 12c this feature is moved to EM console.

Here are the steps to disable OSB services:

1) Logon to EM console

2) Click on Target Navigation present at top left corner as shown below




3) Expand SOA and there you can see your OSB Projects under subheading as service-bus.





   4) Click on your OSB Project will take you to the Home Page, in that click on Operations tab as
       shown below:



         
        

        On Above page check/uncheck you service State to enable/disable. (as highlighted above)



Tuesday, 6 January 2015

Setting Outbound Directory Dynamically in File Adapters - Oracle SOA Suite 11g


We often have a requirement of passing physical directory at run time so that it requires minimum code change in future.

I am listing down steps to do so in Oracle SOA Suite 11g.

In order to start with try to make a composite in order to write a file.

Once you complete your composite it will look something like this.





In this composite I  have configured File Adapter with write operation having physical path as /media/sf_SharedFolder/tempWriteFile

It's screenshot is as follows:



So when you try to open its JCA file as in my case its WriteFile_file.jca then it will look something like this.



The highlighted part in JCA file shows up Physical directory that we have mentioned while configuring write file adapter.

This is nothing but the target directory location where output file will be written, which we need to override by passing dynamic directory.

This is possible simply by setting up a Property as jca.file.Directory.



In order to do so go to your BPEL process and create a variable which is FileOutputDir of type Sting.

Assign value to this variable in assign activity which is /media/sf_SharedFolder/tempWriteFile/location  in my case.



Now we have to set this variable in jca.file.Directory property of invoke operation. 

So double click on invoke activity which open Edit Invoke activity go to its Properties tab and set jca.file.Directory property value as FileOutputDir and its Type should be input.

Apply changes and click on ok.



Save your composite and deploy it to your target server and test it.

Instead of writing file at  /media/sf_SharedFolder/tempWriteFile  your file will be written at /media/sf_SharedFolder/tempWriteFile/location 

jca.file.Directory property overwrites the default Physical Path to said Path.


Monday, 1 September 2014

Key Generation using Keytool command

Steps to create Keys:

Listed are steps used for generating public and private keys for both server and client stores on Linux & Windows Machine.

While generating keys we have used following location:

Linux Machine: /home/test/keystore

Windows Machine: D:\Keystore


Step 1: Command to generate server keypair and store in a keystore

Linux Machine:
Command>keytool -genkey -alias serverKey -keyalg RSA -sigalg SHA1withRSA -dname CN=172.17.103.60,C=US -keypass welcome -keystore /home/test/keystore/server.jks -storepass welcome -validity 365





Windows Machine

Command>keytool -genkey -alias serverKey -keyalg RSA -sigalg SHA1withRSA -dname
CN=172.17.103.145,C=US -keypass welcome -keystore D:\Keystore\server.jks -storepass welcome -validity 365




Step 2: Command to generate client keypair and store in a keystore

Linux Machine:

Command>keytool -genkey -alias clientKey -keyalg RSA -sigalg SHA1withRSA -dname CN=172.17.103.60,C=US -keypass welcome -keystore /home/test/keystore/client.jks -storepass welcome  -validity 365




Windows Machine

Command>keytool -genkey -alias clientKey -keyalg RSA -sigalg SHA1withRSA -dname CN=172.17.103.145,C=US -keypass welcome -keystore D:\Keystore\client.jks -storepass welcome  -validity 365



Step 3 : Export public keys from server keystore.

Linux Machine:

Command>keytool -exportcert -alias serverKey -storepass welcome -keystore /home/test/keystore/server.jks -file /home/test/keystore/server.cer




Windows Machine:

Command>keytool -exportcert -alias serverKey -storepass welcome -keystore D:\Keystore\server.jks -file D:\Keystore\server.cer




Step 4 : Export public keys from client keystore.

Linux Machine:

Command>keytool -exportcert -alias clientKey -storepass welcome -keystore /home/test/keystore/client.jks -file /home/test/keystore/client.cer



Windows Machine:

Command>keytool -exportcert -alias clientKey -storepass welcome -keystore D:\Keystore\client.jks -file D:\Keystore\client.cer



Step 5 : Import client public key into server keystore.

Linux Machine:

Command>keytool -import -alias clientKey -file /home/test/keystore/client.cer -storepass welcome -keystore /home/test/keystore/server.jks




Windows Machine:

Command>keytool -import -alias clientKey -file D:\Keystore\client.cer -storepass welcome -keystore D:\Keystore\server.jks



Step 6: Import server public key into client keystore.

Linux Machine:

Command>keytool -import -alias serverKey -file /home/test/keystore/server.cer -storepass welcome -keystore /home/test/keystore/client.jks



Windows Machine:

Command>keytool -import -alias serverKey -file D:\Keystore\server.cer -storepass welcome -keystore D:\Keystore\client.jks



Step 7: List server keystore content to verify

Linux Machine:

Command>keytool -list -storepass welcome -keystore /home/test/keystore/server.jks







  
Windows Machine:

Command>keytool -list -storepass welcome -keystore D:\Keystore\server.jks



Step 8: List client keystore content to verify

Linux Machine:

Command>keytool -list -storepass welcome -keystore /home/test/keystore/client.jks



Windows Machine:

Command>keytool -list -storepass welcome -keystore D:\Keystore\client.jks



Step 9: Check the keystores and certificates.

Linux Machine:

Command>ls



  
Windows Machine:

Command>dir