Wednesday, 8 January 2014

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)




    No comments:

    Post a Comment

    test