Thursday, December 5, 2019

REST Adapter in OIC

How to use REST Adapter in OIC.?

Login to Console and Navigate to Integrations.

Navigate to Connections.


Select the REST Adapter in Create Connections.


Since we want to expose our integration as REST, Select the Role as Trigger.
If we wanted to invoke a rest adapter, we would create with Role as "Invoke".


There is nothing to configure, so just Test and Save the connection.


Now we have to create the Integration and use the Connection.


 Select App Driven Orchestration.



Select the Connection you have created above.

 Now we have to configure the Input/Output format along with endpoint as shown below.
I'm receiving 2 string elements as input and responding XML element as output.


Note: You can Configure the action as POST too, which will give you option to accept the request as XML,JASON types as well.



Once the configuration is done. Click on the Map to edit the output.


 Enable the Tracing and activate the Integration.






Hello World Program with SOAP Adapter - Click Here
Invoke REST Adapter - Click Here

Wednesday, December 4, 2019

How to import OIC Project (.iar) file in Jdeveloper

How to Import .iar in Jdeveloper

Export the Project from OIC Console.


Open Jdeveloper 12c and Create a new Service Bus Application with the project name same as your OIC project name.


Once the Project is created, click File-> Import.






Now you can edit the XSL's manually and upload it back into your OIC project.

Hello World in OIC - with SOAP Adapter

Below Post will explain the steps to create a Hello World Web-Service in OIC. Its a simple project, with all the screenshots provided. I have tried to compare it with OSB/BPEL for easy understanding.

Once you login to the console, Below is the Home page. Please click on Integrations.


Once you click on Integrations, it will take you to the Designer console.
First we need to create a Connections, It will be exposed as a webservice to external system.
Creating Connections is similar to Proxy Service (OSB) or Exposed Service in BPEL.



Select SOAP Adapter.


Provide a relevant name.
Trigger - Equivalent to Proxy service(OSB) or Exposed Service (BPEL)
Invoke - Equivalent to Business service(OSB) or External Reference (BPEL)
Trigger and Invoke - Can be used as both.



You need to select a Concrete WSDL here. Which will be exposed to the external system.



All the SOAP webservice have to be protected with security. (This usually will be the username-password which you used to login)

Once done, you have to click on Test and make sure you have 100% which means you don't have any error and the connection is ready to use.



Now we will create the Integration where the flow is defined. Which is similar to Proxy Pipeline(OSB) or BPEL (BPEL).


Select the App Driven Orchestration.



Select the connection you have created in above steps.
Note: If your connection doesn't appear here, it means the connection is not 100% and not ready to use. Go back and check the connection.

 Configure the endpoint and leave all the others with default.

It will create a flow with a default mapping in it.
 Select the edit icon for mapping input-output.
For simpler mapping you can click and drag it from Source to target. If you want to use functions, click on the element name.


Select the function you want to use from left tab and complete your mapping.



Once the mapping is complete you can see there is an error on home page. This is a warning message is set the Instance Tracking.



Save the Project.


Once you activate it, it will provide the URL for you to test.


Create a SOAP UI project and test it.


Courtesy : Naresh Pagidipala, who taught me the basis of OIC.


Tuesday, October 23, 2018

Dynamic Partnerlink in BPEL | SOA

How to setup dynamic partnerlink in BPEL. This is used to override the targetsystem URL in the run time. The URL can be stored in AIAConfigurationProperties.xml or variable or URL can be received as input too.

  • Create two variables(TargetEndpointLocation & EndpointReference) as shown below.

For variable "EndpointReference", you can download the schema from below url.

  • Then create an Assign activity with 3 copy actions. Assuming "TargetEndpointLocation" variable already have the Address URL.


Source Code for this assign:
<assign name="AssignPartnerlinkEndpointReference">
<copy>
<from>
<wsa:EndpointReference xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing">
<wsa:Address/>
</wsa:EndpointReference>
</from>
<to variable="EndpointReference"/>
</copy>
<copy>
<from variable="TargetEndpointLocation"/>
<to variable="EndpointReference"
                query="/wsa:EndpointReference/wsa:Address"/>
</copy>
<copy>
<from variable="EndpointReference"/>
<to partnerLink="OrderManagementOSM"/>
</copy>
</assign>

Note: If you are using AIA, you can use the below java code to retrieve the URL from AIAConfigurationProperties.xml




Monday, July 30, 2018

WLST Script : To Create CFS Key in EM Console - SOA

How to Connect to WLST?

Run ./wlst.sh command under $ORACLE_HOME/common/bin/wlst.sh

It will be in offline mode. So,
connect()
Enter username and password along with your admin host and port.



Once its online, Run the below command.

How to Create CFS Key?

createCred(map="mapName", key="keyName", user="userName", password="passW", [desc="description"])

Sample: createCred(map="oracle.wsm.security", key="Test-key", user="username", password="pwd123", desc="Test WLST")



As you can see the command has created the Key Successfully. To verify, you can login to EM Console and validate the same.
http://adminhost:port/em/
Expand Weblogic domain -> Right Click on SOA Server ->Security->Credentials




Other Operations you can perform on CFS key's are,
  • listCred - returns the list of attribute values of a credential in the domain credential store with given map name and key name
  • updateCred - modifies the type, user name, and password of a credential in the domain credential store with given map name and key name.
  • deleteCred - removes a credential with given map name and key name from the domain credential store


Thursday, July 19, 2018

How to Disable a Proxy Service in OSB

Login to SBConsole.
Select the proxy service you want to disable.
Navigate to "Operational Settings" tab.
Disable the Check box on State.




Save the changes.
Activate the Session.