Integrate the two applications

Now that we have created two connections, we can integrate our applications by creating the integration. From the Connections page of the developer portal, we can navigate to the Integrations page, to create our first integration by clicking the Integrations link in the menu at the left side of the page, as shown in the following screenshot:

Integrate the two applications

Let's click the New Integration button. We are presented with a pop-up that gives us multiple patterns to create an integration as shown in the next screenshot. We discussed these integration patterns in Chapter 1, Introducing the Concepts and Terminology:

Integrate the two applications

Select the Basic Map Data pattern for our first point-to-point integration. Before we can setup any integration, every creation starts with choosing a name, version, package name, and an optional description as shown in the following screenshot:

Integrate the two applications

Create the integration with the details given in the following table:

Property

Description

Integration Name

Enter integration name as RetrieveAllAirlines_Ch2

Identifier

This will be proposed based on the integration name and there is no need to change unless you would like an alternative name

Version

Enter version as 01.00.0000

Package Name

Enter package name as ics.book.ch2 (this will be our pattern for each chapter)

Description

Enter description as This integration demonstrates point-to-point connectivity for retrieving all airlines for REST/JSON back-end

With the basic details for the integration completed we can now drag and drop our connections from the connector palette. For the Trigger, drag and drop the FlightAirlinesSOAP_Ch2 connector as shown in the following screenshot:

Integrate the two applications

Tip

The more connections that are created, the longer the list of items will be in the connector palette. Use the search filter to limit the amount of items.

A pop-up is shown with tabbed panels; you can navigate through the steps using the Next and Back buttons. Complete the SOAP endpoint configuration using the following steps:

  1. In the Basic Info tab, call the endpoint: Source.
  2. Add the description: receives SOAP request to get list of all airlines.
  3. If there is an option to Preview updated adapter runtime set that to Yes:

    Integrate the two applications

  4. Click Next to go to the Operations tab.

As we only have a single operation in the WSDL, it selects this operation and its objects. If a WSDL has multiple port types and/or operations this step will give you the option to select the one you want to use. We will show this in Chapter 5Going Social with Twitter and Google. This tab also gives you the choice disable SoapAction validation, which means the service can be called using a different SoapAction than defined in the WSDL, but we recommend keeping this option set to No, to not accept unknown actions as shown in the following screenshot:

Integrate the two applications

  1. Click Next to go to the Summary tab.
  2. This tab shows the details of the configured endpoint:

    Integrate the two applications

  3. Click Done to complete our endpoint configuration.

We can now define the other end of the integration by dropping the connector FlightAirlinesREST_Ch2 onto the Invoke target. A REST connector has many more options that we need to configure.

The resultant dialog can be completed with the following details (leave other fields default):

Tab

Question

Action

Basic Info

Call your endpoint field?

Call it: Target

What does this endpoint do?

Add the description: receives a list of all airlinse from an external REST service.

What is the endpoint's relative resource URI?

Enter the URI: /airlines

What actions does the endpoint perform?

Select the GET method

Configure request and response payload

Check option: Configure this endpoint to receive the response

 

Configure request and response headers

Keep both options unchecked

Integrate the two applications

Tab

Section

Action

Response

Select Response payload

Pick: JSON Sample

Enter sample JSON (click the inline link)

{

    "airline": [{

        "icao": "DLH",

        "name": "Lufthansa",

        "callsign": "LUFTHANSA",

        "country": "Germany"

    },     {

        "icao": "KLM",

        "name": "KLM",

        "callsign": "KLM",

        "country": "The Netherlands"

    }]

}

Integrate the two applications

Tab

Section

Action

Summary

Description

The description we entered

REST Service URI

http://private-xxxx-yourapidomain.apiary-mock.com/airlines

Method

GET

Response Media Type

application/json

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

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