In this tutorial, you create a sample Java Web application that consumes the buzzwordapi API that you created in the previous tutorial.
buzzwordapi allows you to insert any buzzword of your choice to a database that you created in the Integration Cloud. If the same buzzword is added several times, its popularity increases. You can invoke the API to insert buzzwords and retrieve buzzwords in different ways such as all at once, the 10 most popular buzzwords, or the ones that are similar to a word that you provide.
Let's get started!
- Log Sign in to WSO2 Integration Cloud by going to https://wso2.com/cloud/, clicking the Sign In link and then selecting WSO2 Integration Cloud.
- The Integration Cloud opens. Click CREATE APPLICATION.
- Click the Java Web Applications link under Services.
to WSO2 Cloud and go to the Integration Cloud tab. Then, click Java Web Applications.
Select the Local File System option and click Continue.
Enter the following details in the form that opens, scroll down, and click Create.
Field Value Application Name consumer Upload a WAR file Download this sample WAR file and upload it to the Integration Cloud. Environment Variables
Add the following environment variables. They allow you to connect to the API that you created in the API Store in the previous tutorial:
Key Value A PI_MANAGER_URL This is the URL of the API Cloud's Gateway:
<API_PRODUCTION_URL>/all. In this example, it is
To get the
<API_PRODUCTION_URL>, go to the API's Overview tab in the API Store.
A PI_CONSUMER_KEY Go to the APPLICATIONS page in the API Store and copy the consumer key from the Production Keys tab. A PI_CONSUMER_SECRET Go to the APPLICATIONS page in the API Store and copy the consumer key from the Production Keys tab.
Once the application is deployed, click its URL to launch it.
- Note the buzzwords that appear in the buzzword cloud.