In this recipe, we will show how we can create an external reference using an interface definition from a WSDL held in MDS.
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.
This will create an external reference based on the specified WSDL within our composite.
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.
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.