Wednesday, 10 January 2018

EDN - Subscribe events

Hi,

In previous post event we have published, so the same event we are subscribing through a mediator and writing it to file adapter/db adapter.

1. Create a mediator, add published event




2. Add a file adapter, configure it for write operation.

3. Edit the mediator, to route to file Adapter




4. Create new xslt and do mapping: 



 5. edit this tags to step 6


 6. edited tags



7. Composite will look like below:


Deploy the composite, Product event published will be writted to the file.

Keep exploring Soa!
Cheers :) 

Thursday, 4 January 2018

EDN- Publish event using Mediator

Hi readers,

In my previous post we saw how to create and publish event using BPEL.

The same usecase has been used to publish event using Mediator.

Note: Event supports Mediator and BPEL components only.

So lets start,

Steps: 

1. XSD creation , Creation of EDL

2. Drop a mediator ; 1 way ; expose as soap service ; take created Process element as input


3. Composite Looks like below


4. Right click on mediator and 'add published event'


5. Composite will look like this:



Thats how we can publish event using Mediator.

In the next post we can explore on how to consume these published events in our components.

Lets explore SOA!!
Cheers! - Krithika..




EDN - Event Delivery network -Publish Event using BPEL

Hi All,

This post is on how to create edl file and Publish event from BPEL.

Scenario: Have to create a product event, Whenever the details of the products and customer are entered an event should get created.

Steps:

1. Create xsd based on requirement

2. Create Bpel process interaction type 1 way expose it as as soap service

3. Create Event Definition File:



4. Add Element from our created xsd ; Process element

5. Now click on Ok. event def file gets created.

6. We have to edit our 1 way bpel process ( double click on bepl )

7. Add Invoke edit invoke as in step 8; Then add/edit transform activity as in step 9


8. Editing Invoke


9. Add transform, Edit Transform


10. Edit xsl mapper 


11. Composite Now looks like below: Now bpel is publiching our created event: 


12. Save all and deploy composite.

Event gets published in the entire domain, It can be subscribed anywhere, : ie from within the same composite or from different composite.

Keep Exploring EDN!

Cheers.. to the next..
Let's keep exploring SOA! :)

- Krithik G



Wednesday, 13 December 2017

Creating Restful Service from Soa Suite 11g

Hello All,

I had got an assignment to create a rest enabled soa composite where we need to pass any input and we must get a response.

Rest service are widely used for mobile integrations. Since it is light and used over http.

So with the above requirement I have taken usecase as:
Creating a RESTful webservice which has to concatenate users input to a string Welcome.                          
Ex: users i/p à team India   expected o/p à Welcome team India

STEPS:

1. Create SOA Application

2. Create SOA Project

3. Create Empty Composite

4. Create XSD according to requirement

5. Under exposed service drop a HTTP binding adapter ( since we do not find any REST adapter in 11g)

6. Configure HTTP Adapter:






7. Composite will look like this



7. Create BPEL ( define service later )


8. Composite now look like below:


9. Wire the BPEL to the exposed service


10. Open .bpel and add recieve, reply and configure them



11. Receive activity:


Composite look so far :


12. Reply activity:


13. Add assign activity in between recieve and reply and edit: concat('Welcome',' ',recieve input')



14. Save all

15. Configure OWSM policy for http_client exposed service shown in previous post OWSM policy configuration
16. Deploy to the running application server

TESTING:

1. Open deployed composite. Open your wsdl

2. Attach policy to your composite policy configuration

3. This opens the wsdl ( If it does not open with the direct link, replace host name in the URI )

4.  Remove ?WSDL from the above URL and run

To:

5. This opens up a page: Enter your input and click on Invoke REST get


6. There you go! the response page opens with desired output




We can now see the response message as “Welcome” concatenated with the users input.
Our use case scenario is successfully working.


Keep exploring REST!

Lets explore SOA! 

Cheers to the next- krithika :)  









Wednesday, 6 December 2017

Adding OWSM Policies to services ( em & jdev)

Hi,

Many a times it is necessary for us to secure our exposed services/components/external reference with one or more predefined owsm policies.

Here I am demonstrating the same for a exposed rest service.

Example: I have a REST service and I am supposed to add "oracle/multi_token_rest_acces_service_policy"

Steps: Adding policy from EM: 
1. Go to EM Console
2. Go to your deployed composite
3. Policies Tab


4. Click on AttachTo,DetachFrom drop Down and choose service where policy have to be added.


5. This opens up a window with available policies, Choose appropriate and click on attach 


6. This moves the chosen policy to the upper shelf of  "Directly attached policy" ( if you dont want attached policies then click on detach, marked in red)


7. Thats it policy gets attached to our service.


Steps to Configure the same policy for the same service from JDEV:

1. Go to your Jdeveloper, open your composite.xml
2. Choose your service for which you want to configure policies ( here exposed rest service )
3. Right Click on the exposed service 
4. Select Configure WS Policies
5. This opens a window and choose appropriate policy under security tab

6. Once selected below it gets checked, it means it gets added to the service.


7. Go to source of composite.xml and edit the policy name to the exact policy that we attached in the em console for http_client_service
"oracle/multi_token_rest_access_service_policy"



7. Thats all! We can see our exposed service is now Configured with the appropriate policy.


Other general policies that we add:
oracle/wss_username_token_service_policy

Keep exploring owsm policies... 

Cheers! to the next ..
Krithika