Wednesday 8 January 2014

Installation Instructions

       Installation Steps:

OSB provides 2 methods for OSB development, the OSB console, and Eclipse.We can develop all the features using both.But the better way is Develop projects in Eclipe and deploy to osb server and test the services and flow using sbconsole.
Note:The main problem with developing projects  in console is if many users at a time using the same console location and they are working with the same Project.That will conflict the development
We need to 
1.Install database.
2.Install RCU.
3.Install WLS(Included OEPE)
4.Osb 
5.Finally Create Osb domain

   Softwares Info:

         As we know that Weblogic and OEPE installation are pre-requisites for OSB installation.
So we need to know what’s the compatible version of OEPE that works with that particular OSB release. This post presents this information in a simple tabular format below:
OSBWeblogic ServerOEPE
11.1.1.6.0
11.1.1.7.0
10.3.611.1.1.8.0
11.1.1.5.010.3.511.1.1.7.2
11.1.1.4.010.3.411.1.1.6.1
11.1.1.3.010.3.311.1.1.5
  • Download RCU.
           ofm_rcu_win_11.1.1.7.0_64_disk1_1of1
  • We can download WLS with OEPE from the following link.

3.Install WLS (included oepe internally)


  • Run the executable.

           oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-win32


  • I create a new Oracle Home for this installation as it don't want to impact on my JDeveloper install or any other Oracle products installed on my machine.
  • Ignore the support / email notifications
  • Choose Typical installation.
  • Deselect all products then select the Oracle Enterprise Pack for Eclipse. This will select the minimum prerequisites required for install.
  • As I'm only going to use this home for OSB Development I deselect the JRockit JVM.
  • Accept the locations for the installs.
  • If running on a Windows environment you will be asked to start a Node Manger service. This is optional. I have chosen to ignore.
  • Select the user permissions you require, I have set to default.
  • Do a last check to see if the values are correct and continue to install.
  • The install should start.
  • The install should complete successfully. I chose not to run the Quick Start.

4.Install OSB 

     Extract the OSB download to a location of your choice and double click on the setup.exe. You may be asked to supply a correct java location.

ofm_osb_generic_11.1.1.7.0_disk1_1of1

We need to set the jre location as follows..

  • copy the JAVA_HOME environment variable value rightclick on mycomputer-->properties->advancedproperties---?environment variables
  • select JAVA_HOME variable and copy that value.
                 java-home=D:\Oracle\Middleware\jdk160_18
  • open command prompt..navigate to the location where we have that osb setup file..In my case I have copied it in the following location.
                   E:\OSB\SW\Oepe\ofm_osb_generic_11.1.1.6.0_disk1_1of1\Disk1
  • open the command prompt..go to this location.
  • Type the following command to set jre path.
  • Now run below command

                    setup.exe -jreLoc D:\Oracle\Middleware\jdk160_18
  •  just give the path upto jdk version.Then press enter. you are ready to go
  • Install the osb using the link.
  • Skip the software updates.
  • Set the OSB home to the location of the WLS home installed above
  • Choose a custom install as all we want to install is the OSB Eclipse Plugins.

             Note:Choose Typical if you have any issues....
  • Select OSB IDE.
    For the rest of the install screens accept the defaults.
  • Start the install
  • There is no need to configure a WLS domain if you only intend to deploy to the remote server. If you need to do this there are other sites how to configure via the configuration wizard.
  • Start Eclipse to make sure the OSB Plugin has been created. In the top right drop down you should see OSB as an option.
  • Connecting to the remote server, select the Server Tab at the bottom
  • Right-click in that frame and select Server.
  • Chose the remote server version and the hostname
  • Provide and name for your server if necessary, and accept the defaults
  • Enter connection details for the remote server
  • Click on the Remote server and it should validate stating its status.

5.Create OSB domain:

To create OSB domain please refer  "Configure OSB domain"


Creating Business service and Proxy services in OSB


  • create session to track the changes using change center.
  • Go to Project explorer and Create new project.enter name for new project.here "OWSM_security_Project_JAN8th"


  • click on Add project.Then open the project and Select Resources from URL from the create resource LOV.
  • Here we will import the WSDL of the webservice to which we need to create Businessservice and Proxy services.
  • Enter WSDL of the Required webservice in URL/ pathfield
  • Enter any name for ResourceName:
  • Resource type is WSDL.
           Here URL/Path:



Note :if you don't have any WSDL refer Createing sample webservice to get WSDL to Create webservice and get WSDL to do this in osb.

  • Say next and hit import to all these WSDl and its xsd file.
Create Business service:
  • Create Business service Using this WSDL resource.



  • Enter Business service name and select service Type as WSDL and Browse for the Wsdl resource which we have created above.



    • Select the WSDL resource and select Binding/Port and submit it.
    • Endpoint URI
    • http://172.16.2.155:7001/OSB_securing_SessionBean/SecuringWebservice_JAN8th  
                       Here localhost:port/sessionbean name/Webservice name in the Transport configuration and transport typoe is Http by default .Click Next and Last.
    • Save the Business service.
    Create Proxy service:
    • Select Proxy service in the Create resource LOV.

    • Enter name for proxy service and now select service type as"Create from existing service/Business service" and Browse for the Business service which we have created just now.



    • Select the Business service and submit it.Leave all the default values for now and say last and save proxy service.

    • Save proxy service.
    Finally all the OSB artifacts we created are as follows.click on the project name.
    Activate the session by giving meaning full description to take these changes effect and.we can undo redo the changes using change session later if you need.

    Click on submit.

    Now we can Test our BS and PS outside of the session.

    Testing Business service:
    • Go to Project exploraer and click on your project name.it will display all the artifacts of that project ..Near Business service click on the bug icon to launch test console.
    • It will display the operations (methods) in the webservice for which wsdl we have created BS under "Available operations "section.
    • Note:my webservice Has only two methods....findall() and findByID()( Createing sample webservice to get WSDL )


    • Select the operation you want to test.and pass parameter if it required then click on execute.it will execute the method and return the output in response document.




    • I have passed 222 as id and it return the name with that id..
    • Now select findall in operations and say execute.It will return all the records in the Table as Used by the web service while creating entity(refer create ejb webservice in this blog).
    Done with testing......

    we can test our proxy also as same.
    And the proxy service is not created using this WSDL directly..We have created Proxy using this business service.So Our proxy message flow is routed to this business service directly and call this business service operations.(use of Proxy service)




    Creating EJB webservice using JDEV

    entity get generated..after that open entity.and add new annotaion to find users by id as follows.
    Save it and Create Session bean.
    session bean has created.Now we need to create webservice form this sessionbean.

    Test Webservice...
    NOTE:

    in our selected table,Id field is type Number..So While creating Annotaions and in sessionbean,local and remote interfaces we need to pass int parameter rather than the default Object type paramter.Otherwise..test will fail like following..
    Local and remote beans also need to change this type..

    Now Test web service again.now it will work fine..
    Deploy to em:

    right-click on project and say deploy to ejbwebservices..
    Add new connection with the new osb domain credentials...(where the server are installed)
    pwd:welcome1

    enter domain name "osb_domain"(which name we have given in configuration of this domain)

    Test connections
    9 should be successful

    Deploy it to all domains..
    We can get the WSDL of this webservice in EM.--Login to EM..Weblogic domain---adminserver---Deployments---
    click on the application which we have deployed just now.Under Admin server click on test icon.we can get WSDL of the webservice here as follows.

    WSDL:
    http://172.16.2.155:7001/OSB_securing_SessionBean/SecuringWebservice_JAN8th?wsdl

    We can use this WSDL later in Osb to create business and Proxy services  for practise.
















    Securing Proxy using Username TokenAuthentication

    PRESETUP:

    Setup all the requirements as in  setup the OSB server to work with OWSM file.

    What is Username Token Policy?

    The Securing a proxy service by Username Token authentication means  
    that only authenticated users have access to services through the use of OWSM.

    TO DO:


    • Navigate to the Policy tab.



  • Enable From OWSM Policy Store.


    • Click Service Level Policies, which will enable the Add button.
    • Click Add and the OWSM Policy Configuration window will open.
    • Select the oracle/wss_username_token_service_policy from the list of policies and click submit. 
    • The Username Token policy will be displayed in the Policy tab of the proxy service.



    • Update the proxy service.



  • We have successfully secured our proxy service using UsernameToken WS-Security SOAP headers to authenticate users.


  • Now Lets test it.


    • Navigate to the proxy service (in Project Explorer, click on the project and then on the proxy folder) and click on the Launch Test Console icon (with the bug).
    • Click Execute (the value passed in the ID does not have an effect)
    • Click on execute.
    • We get an error because we have not passed a username and password. 
    • Click Back to specify the username and password.
    • In the test console, scroll down until the Security area is visible.
    • Enter osbtest_key into the Override Value field and click Execute.(Please refer setup the OSB server to work with OWSM file.)
    • Click on execute now.It wont throw any error.It will work perfectly..
    The test should now work and a valid response should be returned by the proxy
    service. The test console also shows the SOAP header with the Username Token
    necessary for the authentication.