Thursday, July 9, 2020

Hello World Demo in Oracle OSB

This post shows how to create a simple hello world demo using service bus project in OSB Application.

1. Create a new service bus project in service bus application. If the application is not created, create a new OSB application (Click New>Service bus application).
Click on New>From Gallery>Service bus Project.



Give a name to the Project and click on Finish.


2. Drag and drop a pipeline from the Components section. Change the name if you want to and click Next.



 In the next screen, select WSDL and click on 'Create a WSDL' icon to create one.



3. In the WSDL screen, select the Interface type as Synchronous Interface as below.


Now, click on the '+' icon under Input.


Change the Part Name if you want to change and click on the magnifier icon in URL field to select the type. You can also choose this using xsd file but I've given it manually without creating the schema to keep it simple.


Expand XML Schema Simple Types and select string as type. Then Click OK. Do the same for Output variable and click OK in the WSDL screen.


4. Check 'the checkbox Expose as a Proxy Service' and then click Finish.



Your composite would look like this.




5. Double click on the Pipeline. You'll see a pipeline like below.



Drag and drop a Pipeline Pair from the Components. Add a Replace activity in the response pipeline as below.


Click on the Replace and add values as below.

location: "'body
XPath Expression: . ("." represents curent node)
Value: concat('Hello ', $body/hel:string)
Replace option: Replace node contents.





6. Now that we have done with creating a sample hello world project, save the project and deploy the project to the OSB server. For deployment, right click on the project, select deploy option.



Select osb server and and Finish.

Now go to service bus console page and click on the pipeline or proxy service of the project to test it.

Cheers!!



No comments:

Post a Comment

Featured Posts

Sample Real Time Assignment in Oracle SOA