Using a routing action to statically route to another service

To route the message to another service (to a business service or even to another proxy service) a routing action inside a Route node needs to be used.

Getting ready

Make sure you have the current state of the basic-osb-service project available in Eclipse OEPE. We will start this recipe from there. If necessary, it can be imported from here: chapter-1getting-readyecho-proxy-service-created.

How to do it...

In Eclipse OEPE, perform the following steps:

  1. Drag a Route node from the Design Palette and drop it on the message flow path below the interface. A green circle indicates that the item can be dropped here:
    How to do it...
  2. Rename the Route node to RouteToCustomerService.
  3. Drag a Routing action from the Communication section of the Design Palette into the Route node:
    How to do it...
  4. In the Properties of the Routing action click on the Browse button next to the Service field and select the business service CustomerService.biz (to be found in the business folder).
  5. In the Invoking drop-down list, select RetrieveCustomerByCriteria as the operation to be called:
    How to do it...
  6. Click on the Save button.

How it works...

We have created a single route to the operation RetrieveCustomerByCriteria of the external web service. But we not only have one operation on the proxy service to implement, our WSDL contains two operations, which we need to route to different operations on the external service. Therefore, just a single Routing action is not enough. We need to use an Operational Branch with a branch containing a different Routing action. Using an Operation Branch node will be shown in the next recipe.

We cannot select the Use inbound operation for outbound option, because the WSDL on the proxy service is no longer the same as the one on the business service (external service), that is, the operation names do not match.

See also

Check the next recipe for how to add an Operational Branch to the proxy service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset