Creating an external reference using a WSDL in MDS

In this recipe, we will show how we can create an external reference using an interface definition from a WSDL held in MDS.

Getting ready

Make sure you have created a file-based MDS repository for JDeveloper, as described in the initial recipe. Then open the SOA project in which you want to create the external reference.

How to do it...

  1. Drag a Web Service from the Service Adapters section of the SOA Component Palette onto your composite. This will launch the Create Web Service wizard; specify an appropriate name for it (Employee in the following example), and for Template select Interface Definition from WSDL.
    How to do it...
  2. Click on the Find Existing WSDLs icon (as we did in the previous recipe); this will launch SOA Resource Browser. Select Resource Palette from the drop-down list.
  3. Select the WSDL that you wish to import and click on OK. This will return you to the Create Web Service Wizard window; ensure that the Port Type is populated and click on OK.

This will create an external reference based on the specified WSDL within our composite.

How it works...

When we import a WSDL in this fashion, JDeveloper doesn't actually make a copy of the schema; rather within the composite.xml file, it sets the wsdlLocation attribute for the external service reference to point to the location of the WSDL in MDS.

There's more...

As you move composites from one environment to another (for example, from test to pre-prod to prod), you typically need to modify the WSDL to any external web service, to point it to the correct endpoint.

This should be done using a configuration plan; however using this approach enables all your endpoints to be configured separately in MDS, enabling your composites to be completely agnostic of the environment in which they are deployed.

Note

If your composite makes use of adapters, such as the file or database adapter, then it will still contain environment specific values. This can be avoided by using only the adapters within Oracle Service Bus.

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

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