Showing posts with label For Each OSB. Show all posts
Showing posts with label For Each OSB. Show all posts

Thursday 4 May 2017

Securing OSB Proxy Service using OWSM : Simple guide

Service Bus is integrated with Oracle Webservices Manager (OWSM) that provides several out of the box security policies. You can use any of these OWSM policies to secure your Proxy Services based on requirements. Here in this post, you will use oracle/wss_username_token_service_policy policy to secure Proxy Service.
Steps Summary :
1.    Create Users who needs access
2.    Add policy to Service
3.    Test and Validate

Login to Admin Console and click Security Realms in Domain Structure.




Click myrealm as shown below.




Navigate to Users by clicking on Users and Groups tab.




Click New and enter credentials as shown below.



Click OK. 
Observe that new user has been created which can be used to invoke Proxy Service.







Go to sbconsole. Create a new session. Navigate to All Projects –> <<your project>> and open the Proxy service to bring up a new tab as shown below.




Click Security and choose the option as shown below.



Click Attach Policies icon (highlighted above) and select the policy as shown below and click Attach.




Click OK and observe that selected policy is shown up as shown below.


Save your changes in current tab and activate the session.


You can use SOAPUI or SBConsole Test service for testing.
Open request editor for any of your Proxy Service operations and paste the following in SOAP header. This represents the WS-Security header and is expected by OWSM policy i.e. attached to Proxy Service.

Test using wrong credentials or without security header and observe the output showing security error.



Test using credentials created in first section and observe the output.
Add below header to your request, You can see username and password fields below.
                                                              
<soap:Header>
                <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                                <wsse:UsernameToken wsu:Id="UsernameToken-F7A4A73DA710AE195C14938940405155">
                                                <wsse:Username>dheeraj</wsse:Username>
                                                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">webic123</wsse:Password>
                                                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">T36cJsRsgb5IzQyyy/Yskw==</wsse:Nonce>
                                                <wsu:Created>2017-05-04T10:34:00.515Z</wsu:Created>
                                </wsse:UsernameToken>
                </wsse:Security>
</soap:Header>






That’s all.




Wednesday 15 June 2016

Download directly to Unix/Linux from Internet/Oracle using WGET command


Hi Guys,

In this post, I will describe the process to directly download installers from Oracle.com to Unix Machines.
You may wonder, why a post on this topic. Its fairly easy, but sometimes we dont have Browsers in Linux machines. We only have the Terminal or Putty screens to work.
Here's the process, to download using putty.

1. Log in to Unix Machine using Putty.
2. Navigate to location, where you want download installers.
3. Now using any windows PC Chrome browser, Login to Oracle.com, Select your installer & Download it to PC. In Chrome Download tab, Right Click on Downloading file. Select 'Copy Link Address'.

The address will look something like below

http://download.oracle.com/otn/nt/middleware/12c/1221/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip?AuthParam=1454049262_286c6d7c2bf0ba6eb3c31dcfb3d309a0

This address is valid for few minutes only. Hence do all steps faster.

4. Prepare a command as below using this adrress, your username  password,


wget --http-user=dhexxxxxxha@xxxxx.com --http-password=xxxxx234a --no-check-certificate "http://download.oracle.com/otn/nt/middleware/12c/1221/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip?AuthParam=1454049262_286c6d7c2bf0ba6eb3c31dcfb3d309a0" -O NameOfDownloadedFile.zip

5. Copy the above Command and Paste it to Putty screen. Hit enter, your download will start.
6. Repeat the same steps if there are multiple installers.


Thats it folks!

SOA - Using ora:getPreference() in BPEL process to get Environment specific Values

Hi Folks,

There are scenarios, when we have SOA Services (Composites), which uses Environment specific data in the transaction.
For Example - You have created Logging or BAM Service, which can be deployed across various Environments like Staging(Testing), Production. Now to identify the Transaction between various environment, you may need some sort of Identifiers. Like :

Environment Identifier
Development DEV
Test         TST
Production PRD

To achieve this, there could be multiple solutions. Here I am going to discuss one solution which uses function
ora:getPreference()

The syntax of function is  :
ora:getPreference('environmentName')

Here 'environmentName' is variable name.



Steps of implementation:

STEP 1 : Use Assign Action in BPEL flow & add function ora:getPreference('environmentName') in required field.





STEP 2 :  Once your code is compiled & Deployed to Server, you need to set the value of this variable in EM console.

STEP 3 : Login to EM console. On the left go to : Farm_soa_domain > Weblogic Domain > soa_domain > right mouseclick and select ‘System MBean Browser’.



STEP 4 : Then Navigate to : Defined MBeans > oracle.soa.config > Server : soa_server1 > SCAComposite > your_project > SCAComposite.SCAComponent > your bpel_process.





STEP 5 : Change the Value, and Apply.


Thats all !







Saturday 5 March 2016

OSB 12c - For Each action

Hey guys !

In this Post I am going through the For Each functionality in OSB 12c.


Use Case 

Simple Integration  Scenarios, Where Source system payload has Repeated Nodes, Target System expects one node at a time.



Design


Step 1 : 

Create a OSB Project, Add a Pipeline. Inside Pipeline Add a For Each Action.





Step 2:

Provide the required data in For Each Properties. Shown below



This is all we need to Implement For Each. 
However we will have to further process the Data, This could depend on your Requirement.
For the Demo Purpose, I am Sending this data to a Business Service using Publish Action.


Step 3:

Add a Publish Action inside For Each. Add a Assign action to see the Payload of the For Each iteration in Testing. Screens Below





Step 4:

Export and Deploy your code to Server.



Testing







Request Payload

<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
  <Message>
        <MessageID>1</MessageID>
        <OrderReport>
            <OrderID>102-4552-913811</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-2066</SKU>                
             </Item>
        </OrderReport>
  </Message>
  <Message>
        <MessageID>2</MessageID>
        <OrderReport>
            <OrderID>102-4556812-97811</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-20166</SKU>                
             </Item>
        </OrderReport>
  </Message>
  <Message>
        <MessageID>3</MessageID>
        <OrderReport>
            <OrderID>102-4556812-91371</OrderID>           
            <Item>
                <OrderItemCode>09588730573218</OrderItemCode>
                <SKU>05988-266</SKU>                
             </Item>
        </OrderReport>
  </Message>
</Envelope>


For Each output for Last Iteration

<Message>
<MessageID>3</MessageID>
<OrderReport>
<OrderID>102-4556812-91371</OrderID>
<Item>
<OrderItemCode>09588730573218</OrderItemCode>
<SKU>05988-266</SKU>
</Item>
</OrderReport>
</Message>



Thats All Folks !






Here are some other posts, which may interests you

1. Fusion Middleware 12c – SAP Adapter Configuration

http://osb-dheeraj.blogspot.in/2016/02/fusion-middleware-12c-sap-adapter.html

2. Oracle Integration Cloud Service (ICS)

http://osb-dheeraj.blogspot.in/2016/02/oracle-integration-cloud-service-ics.html


3. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1

http://osb-dheeraj.blogspot.in/2016/02/soa-interview-questions-service.html



http://osb-dheeraj.blogspot.in/2016/02/osb-12c-domain-value-map-dvm.html