Sunday, 15 October 2017

SOA 12C - Create soa 12c Server Domain

his post helps to create domain for Oracle SOA 12c. Oracle SOA 12c comes as standalone installer that means we need not to install Database, RCU, Weblogic , SOA and OSB installer separately.  By default Oracle SOA 12c use Java DB but we can also use Oracle Database.

Once we install the Oracle SOA 12c, next step is to configure the domain. In this post, we see how to configure different  domains.

We can configure below mentioned three different types of domain in Oracle SOA 12c.


We discuss about each domain one by one.

Integrated WebLogic Server's default domain in JDeveloper

Default domain is created on Integrated weblogic server which is chained to Jdeveloper that means when we close the jdeveloper session weblogic server also shut down. This integrated weblogic by default use Java DB so this default domain also use Java DB.

Benefits of default domain
  • Light weight

Drawbacks of default domain
  • This is chained to jdeveloper, so every time you start a new JDeveloper session, you need to re-launch the Integrated WebLogic Server.
  • MFT (Managed File Transfer ), ESS (Enterprise Service Scheduler) , Healthcare , B2B, BAM components not supported.

Click here to see how to create default domain.



Configure a standalone domain

We can also create Standalone domain for Integrated WebLogic Server. The server and domain run independently of JDeveloper. This domain still use Java DB.

Benefits of standalone domain
  • Standalone domain save startup time if you plan on developing an application in JDeveloper over a series of separate sessions.
  • This domain save you even more time if you plan to develop applications in the Oracle Service Bus browser-based console and never plan to launch JDeveloper.

Drawbacks of standalone domain
  • MFT (Managed File Transfer ), ESS (Enterprise Service Scheduler) , Healthcare , B2B, BAM components not supported.

Click here to see how to create standalone domain.



Configure a compact domain

When we plan to use Oracle database then we use this domain. we use this domain when we need to use MFT (Managed File Transfer ), ESS (Enterprise Service Scheduler) , Healthcare , B2B, BAM components.

SOA 12c Step by Step Installation

In this post, I will show you step by step installation of Oracle SOA 12c on window 7.

There are some prerequisites that you need to fulfill before installing Oracle SOA 12c. your system should fulfill all the requirement. See below link to check system requirement.


Follow below steps to install Oracle SOA 12c.

Step 1:

Download Oracle SOA 12c installer.

Go to below link.


Accept the License Agreement.


Click on Download link to download the installer.





You will see one jar file downloaded to your system. Extract that jar file and you will see below two executable jar files.
  • fmw_12.1.3.0.0_soa_quickstart
  • fmw_12.1.3.0.0_soa_quickstart2

We need to run these executable jar files from command prompt.


Step 2:

You also need to download supported JDK, you will not be able to run Oracle SOA 12c installer if you don’t have supported JDK.

You can download latest jdk from below link.


By default this will be installed in C:\Program Files\Java.


Step 3:

Open the cmd prompt, right-click on it and run it as administrator.




Step 4:

Go to java bin folder where you have installed latest JDK. E.g. C:\Program Files\Java\jdk1.8.0_05\bin
Oracle SOA 12c is an executable jar file so we need to run it from command prompt.

Run below command in command prompt.

Java –jar Oracle_SOA_12c_exceutable_Jar_File_Location

Here you need to provide first executable jar file path.



You will see it start extracting file.

Once all files extracted, it will launch the installer.






Step 5:

You see window of quick start installation, click on next.




Step 6:

You need to specify Oracle home directory. If there is any issue with the directory like space is not available then installer will show that error at below pane.

Click Next.




Step 7:

In this step installer check system certification and Java Version. Both prerequisite should meet.
Click Next.




Step 8:

You see installation summary page, you can save the response file if you want to.

Click on “Install” to start the actual installation process.




Step 9:

In this step, installer copy all required libraries or files to your system.



Some time you may get below error when installer copy files to your system. This error occur when you use JDK 8 but you will not get this error when you use JDK 7.

Error: ....Failed to Transform .................Can't rename temporary file name..................

This error may occur due to access issue, I still need to investigate the root cause of this but there in one work around which worked for me.

Just change Oracle home path from “C:\Oracle\Middleware\Oracle_Home” to “C:\Oracle_1\Middleware\Oracle_Home”.



You see the installation progress.



Once setup is complete, click on Next.


Step 10:

In this screen, you see installation summary. If you want to start the Jdeveloper then you can check the “Start Jdeveloper” box and click on Finish.



Step 11: Now we will create domain. Go to next Chapter-2 to create required domain.



Step 12: Now we will add SOA extension to the JDeveloper. To do this go to Help --> Check for Updates.



Check all checkboxes and click on next.



Then you will see next window and in that window you see IDE folder and under that you see "Extension SDK".

Click on the checkbox and install it.


There are two types of web services. SOAP and REST web services. We usually deal with SOAP web services in Oracle SOA but we can also create RESTful web services in SOA.

RESTful web services are built to work best on the Web. Representational State Transfer (REST) is an architectural style. In REST data can be transmitted over a standardized interface (such as HTTP).


This post shows how we can create RESTful web service in Oracle SOA. Follow below steps to create it.
We will use below schema for this post.




First create one SOA project. In composite.xml file drag “HTTP Binding” adapter and start configure it.





Choose “service” from type drop-down list.

Choose request and response element from your schema.


Once you create HTTP binding adapter, drag a BPEL process to composite.xml file.




Wire your BPEL process with HTTP adapter.




 Inside BPEL process, add receive activity and link it to HTTP adapter to receive the request.



Add reply activity and link it to HTTP adapter to send the response back.


Deploy your composite.


You can test your composite using below URL.

http://localhost:8001/soa-infra/services/default/RESTfulService/http_Client?input=test&operationName=Request-Response



 Testing Results







We will use below RESTful web service which we created in previous post.

http://localhost:8001/soa-infra/services/default/RESTfulService/http_Client?input=test&operationName=Request-Response

To create project in OSB first we need to create a session and add new OSB project. Add required project folders to this project. Your project should look like below.

CallRESTfulService


    • business
    • proxy
    • resources


    Go to business folder and start with Business service creation, which in turn call our RESTful service. Give your business service a name and choose “Message Service” as Service Type. 
    Choose Request Message Type as “None” and Response Message Type as “Text”.


    Choose “http” from protocol drop-down list and add RESTful web service endpoint to Endpoint URI. Make sure you don’t add full URI, don’t include parameter when you mention URI here. Click on “Add” to add your service URI.

    Choose HTTP Request Method as “GET” from drop-down list.


    Accept default and save your Business service. Your Business service creation is complete.

    You can test your business service to check whether it successfully call RESTful service. Make sure you activate your session before testing your business service.

    We use below request message to test our Business Service.


    Below is the response from RESTful service to Business Service.




    Now we will create a proxy service which will call above created business service and pass required query parameters to business service.

    Go to proxy folder and create a proxy service, name your proxy service and choose “Business Service” as Service Type. Browse to already created business service and click next.




    Accept defaults and complete your proxy service creation. Now we need to pass required query parameters to business service which in turn uses these parameters to call RESTful web service.

    We use Insert activity to pass required parameters to business service.

    To add required insert activates go to proxy service message flow and add Insert activity to it.


    First Insert action will add “http-method” to outbound request.
    To do that click on expression link of Insert activity and add below text to it.

    GET
    Click on <Xpath> link and choose “transport/request” element as we will add “http-method” as a child of outbound transport request.



    First Insert activity should look like below.




    Add another Insert activity, in this Insert activity we will add query-parameters element to outbound request message. Click on expression link and add below text to it.

    Click on <Xpath> link and choose “transport/request” element as we will add “query-parameters” as a child of outbound transport request.



    Now we need to add two query parameters which are required to call that RESTful service. Add first parameters by adding another Insert activity. Click on expression link and add bellow text to it.



    Above element will add as a child of <http:query-parameters> element.



    Do it same for another query parameter.

    Your proxy service message flow will have total 4 insert activities now.

    Activate your session and test your proxy service.

    You can see below outbound message and clearly see all the required information in this message which is required to call RESTful service.



    When you test your proxy service, you may receive below error message.



    To resolve this error, we need to add proper encoding, to do that we need to add another Insert activity to message flow of proxy service.
    Above element will be added as child of outbound “transport/request” element.




    Below is your final message flow.



    Again test your proxy service.

    Testing Results