Lab OSB Bonus

23
BPEL/OSB Bonus Lab 11g Workshop 1 Oracle® SOA Suite 11.1.1.2 Hands-On Workshop OSB Lab 2b

description

OSB

Transcript of Lab OSB Bonus

Page 1: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 1

Oracle® SOA Suite 11.1.1.2

Hands-On Workshop OSB Lab 2b

Page 2: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 2

This is an optional lab which Needs to be completed before doing Lab3 in

which you can substitute an Oracle Service Bus call out to the CreditScore web service

reference created near the end of Lab2

Start the Oracle Service Bus

1. Start the OSB server by double clicking on the Start/Stop Weblogic Server(s)

Desktop icon or right click on it and selecting Open.

2. Select the Start radio button and click OK.

Page 3: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 3

3. Select the OSB checkbox and de-select the admin checkbox if the Weblogic Server

and SOA Suite are already running ( which they should be at this point ). If not

running then select it also and click OK.

4. After a few minutes the OSB server should show an OK. Click Close.

5. A status pop up should the status as Up. Click Close.

Page 4: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 4

Create the CreditScore flow in the Service Bus

1. Bring up Firefox by double clicking on the Firefox Desktop icon or right click on it

and selecting Open.

2. Open up the Service Bus Console by right-clicking on the “OSB Console” link in the

browser and selecting “Open in New Tab”.

3. Enter weblogic/weblogic as the (Username/Password) and click the “Login” button.

4. Under the “Change Center” pane click the Create button to enable an editing

session.

Page 5: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 5

5. We will now create a Proxy Service (incoming) and Business Service (outgoing)

to take input from the BPEL PermitProcess flow and call the CreditScore web service

we deployed in Lab 2. The Proxy Service will use the same WSDL definition as our

web service so payloads will easily map. Even though this is a simplistic example, it

enforces the notion that all messaging in our design will be brokered by the service

bus.

In the bottom left hand side of the page click on the “Project Explorer” link.

6. Enter a new project named “CreditScore” and click the Add Project button.

7. Click the CreditScore project link:

Page 6: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 6

8. Create a new folder under this project called „Schemas”: Enter “Schemas” as the

folder name and click the Add Folder button.

9. Click the Schemas link:

10. Import the WSDL to be used for our Proxy Service. In the Resources section on the

page click on the “Select Resource Type” drop down box and select WSDL:

Page 7: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 7

11. Give the new Resource Name “CreditScore” and browse to the

CreditScoreService.wsdl file in the /home/oracle/MyFiles directory. Select the file

click Open.

12. Click Save.

You should see the following:

13. Under the Project Explorer pane on the left center of the page click the CreditScore

project to navigate back to the parent level.

Page 8: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 8

14. In the Resources section on the page click on the “Select Resource Type” drop

down box and select Business Service:

15. Enter the Service Name as: CreditScoreBusiness, check the “WSDL Web Service”

radio button and click the Browse button to select a WSDL:

Page 9: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 9

16. Under the “Select a WSDL” dialog page click the CreditScore wsdl link.

17. Under the “Select WSDL definition” dialog page select the CreditScorePort and

click Submit. You will be return to the “Create a Business Service” dialog.

Page 10: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 10

18. Click “Next > >”. In the „Transport Configuration” dialog set the following:

a. Load Balancing Algorithum: none

b. Ensure that the Endpoint URI is:

http://localhost:7001/CreditScore/CreditScorePort

You should end up with:

19. Click the “Last > >” button. The areas we modified will be displayed in the final

configuration:

Page 11: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 11

20. Click Save. The definition of the Business Service is complete. Complete the editing

changes for this session by clicking the Activate button in the “Change Center”

pane and then Submit in the “Activate Session” dialog.

21. Start a new editing session for the creation of the Proxy Service by clicking “Create”

in the “Change Center” pane.

22. Under the Project Explorer pane on the left center of the page click the CreditScore

project.

23. In the Resources section on the page click on the “Select Resource Type” drop

down box and select Proxy Service:

Page 12: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 12

24. Enter the Service Name as: CreditScoreProxy, check the “WSDL Web Service”

radio button and click the Browse button to select the WSDL:

25. In the “Select a WSDL” dialog click the CreditScore link.

26. Under the “Select WSDL definition” dialog page select the CreditScorePort and

click Submit. will be return to the “Create a Proxy Service” dialog.

Page 13: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 13

27. Click the “Last > >” button. The areas we have configured will be displayed:

28. Click Save. The definition of the Proxy Service is complete. Our project should now

contain two services:

Page 14: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 14

29. Now, we will define a message flow that tol route the XML payload coming into the

CreditScoreProxy “Proxy Service” to the CreditScoreBusiness “Business Service”.

This is where will you do any transformations, routing rules, etc. In our case, since

the WSDL used in both services is the same, no special transformation has to take

place.

Click the “Edit Message Flow” icon in the CreditScoreProxy service:

*NOTE: Our editing session is still in progress….

30. In the “Edit Message Flow” dialog click on the CreditScoreProxy icon and select

“Add Pipeline Pair”: (This is for Request/Response)

Page 15: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 15

31. Click on the “PiplinePairNode1” icon and select “Add Route”:

32. Click on the RouteNode1 icon and select “Edit Name and Comments”:

Page 16: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 16

33. Enter “Call_CreditScoreBusiness” for the Name and click Save.

34. Click on the Call_CreditScoreBusiness icon and select “Edit Route”.

35. Click the “Add an Action” link and select “Communication Routing”:

Page 17: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 17

36. Click the <Service> link:

37. In the “Select Service” dialog check the radio button for CreditScoreBusiness and

click the Submit button.

38. Back at the “Edit Stage Configuration” dialog select the CreditScore Operation

from the drop down box:

Page 18: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 18

39. Back at the Edit Message Flow page we will add a stage into the response pipeline so

that we can log the <score> response from the CreditScore web service. This will

proof out execution of this flow. Click on the “Response Pipeline” stage and select

Add Stage.

40. Click stage1 and select Edit Name and Comments.

41. Enter Log Response as the Name and click Save.

Page 19: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 19

42. Click on the Log Response stage and select Edit Stage.

43. Click the Add an Action link and select ReportingLog.

44. Click the Expression link.

Page 20: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 20

45. Enter the following into the XQuery editor: concat('Credit Score returned = ', $body/ccs:score)

NOTE: This expression takes the returned <score> value from the CreditScore web service and wraps text around it.

46. Click the Validate button to ensure the syntax.

47. Click Save.

48. Back at the “Edit Stage Configuration” page, ENSURE that the log severity level is

set to Warning.

49. Click the Save All button. The message flow is now completed.

Page 21: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 21

50. The definition of the Business Service is complete. Complete the editing changes for

this session by clicking the Activate button in the “Change Center” pane and then

Submit in the “Activate Session” dialog.

51. Once the project is saved you can test drive the Proxy Service by selecting the

CreditScore project in the “Project Explorer” pane and clicking on the “Launch

Test Console” icon of the CreditScoreProxy service inside the Resources section of

the page.

52. The CreditScore web service returns data based on the value of the first character of

the SSN. SSN‟s starting with a 3 should return 721 upon successful execution. Those

starting with a “2” will return 644 and those starting with a “1” will return 583. Enter

“321-45-6666” into the SSN field in place of the default value of “string”. Click the

Execute button.

The <score> field should contain “721”

Page 22: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 22

53. Click the “Back” button to retest. Enter a SSN that starts with a “2” and finally the do

a last test with the value beginning with a “1”. Confirm the results:

Page 23: Lab OSB Bonus

BPEL/OSB Bonus Lab – 11g Workshop 23

These Proxy and Business services will now to be used in the BPEL Lab.