4 Using Oracle JDeveloper to Interact with Oracle API Catalog

This chapter describes the consumption processes and the interaction of Oracle JDeveloper with Oracle API Catalog.

This chapter includes the following sections:

4.1 Using Oracle JDeveloper

The Oracle API Catalog provides a flexible meta model for cataloging all assets within the SOA ecosystem. It is primarily used during the plan, design, and build phase of the lifecycle as a single source of truth for application development.

You can use Oracle SOA Suite with Oracle API Catalog 12c.

This section describes the following topics:

4.1.1 Associating a JDeveloper Application with Oracle API Catalog

You must associate the JDeveloper application with a default Oracle API Catalog connection to consume assets from Oracle API Catalog using JDeveloper. To associate a JDeveloper application with a default Oracle API Catalog connection:

  1. In Oracle JDeveloper, expand the Tools menu, and then select Oracle API Catalog. The Configure Oracle Enterprise Repository Integration dialog is displayed.

    Note:

    You select Oracle Enterprise Repository from JDeveloper's Tools Menu even when using Oracle API Catalog.
  2. Select the following options, as shown in Figure 4-1.

    • Repository Connection: Select the Oracle API Catalog connection that you want to use for usage tracking.

    Note:

    The Repository Project option is not available for Oracle API Catalog.

    Figure 4-1 Configure Oracle Enterprise Repository Integration dialog

    Description of Figure 4-1 follows
    Description of "Figure 4-1 Configure Oracle Enterprise Repository Integration dialog"

  3. Click OK.

You can now consume assets from the connection that you have selected.

4.1.2 Search Oracle API Catalog

You can access the APIs available in the Oracle Enterprise Repository through Oracle JDeveloper. Through Oracle JDeveloper, you can search for APIs matching various criteria or view APIs that may be of interest to a development project.

To search for assets in Oracle Enterprise Repository, perform the following steps:

  1. In Oracle JDeveloper, click Resource Palette. The Resource Palette tab with the IDE Connections is displayed.

  2. In the Search text field, enter the search criteria, for example, the name of the API that you want to view the details for, and click Start Search. The Search Results pane is displayed with the API.

4.1.3 Consuming an API from Oracle Enterprise Repository

You can download an API into your project. Typically, an API's payload is a functionality that you need to use a service, such as a WSDL or WADL file.

To consume a WSDL file or a service from Oracle Enterprise Repository, perform the following steps:

  1. In Oracle JDeveloper, double-click the composite.xml file. The composite.xml page is displayed.

  2. Drag and drop the Web Service component from the Component Palette to the External References swim lane. The Create Web Service dialog is displayed.

  3. Click the Finding Existing WSDLs icon at the end of the WSDL URL field. The WSDL Chooser dialog is displayed.

  4. Select the Oracle Enterprise Repsoitory tab, as shown in Figure 4-2.

    Figure 4-2 WSDL Chooser Dialog

    Description of Figure 4-2 follows
    Description of "Figure 4-2 WSDL Chooser Dialog"

  5. Use the navigation tree to find the service that you want to invoke/consume.

    If the service has only one WSDL or UDDI key associated with it, then the same WSDL or UDDI key is used to create the reference. If service has more than one WSDL and/or UDDI key associated with it, then the Choose WSDL dialog is displayed, as shown in Figure 4-3.

    Figure 4-3 Choose WSDL Dialog

    Description of Figure 4-3 follows
    Description of "Figure 4-3 Choose WSDL Dialog"

    You must select an URLs/UDDI keys to consume. For resolving UDDI keys in JDeveloper, you have to create a UDDI connection prior to creating the reference, without which you cannot select UDDI keys.

  6. Click OK.

To consume a WADL file or a service from Oracle Enterprise Repository, perform the following steps:

  1. In Oracle JDeveloper, double-click the composite.xml file. The composite.xml page is displayed.

  2. Drag and drop the REST Service component from the Component Palette to the External References swim lane. The Create REST Binding dialog is displayed.

  3. Enter the required information into the Name, Type, and Base URI fields.

  4. Enter the necessary information into the Resources panel.

  5. From the Operation Bindings panel, click the Add icon and select Add operations based on WADL Service. The WADL Chooser dialog is displayed.

  6. Select the Oracle Enterprise Repository tab.

  7. Use the navigation tree to find the service that you want to invoke/consume.