This section illustrates how to use HTTPAdapters to access a secure HTTP connection. For this, use the keystore and the trustore created by following Configure Keystore section.
The section demostrates how HTTPAdapters component can be configured for HTTP Get operation to access a secured HTTP connection.

Perform the following actions:

  1. Start the Studio. Next, drag and drop the HTTPAdapters component from the Service Pallete.
  2. Double-click  the HTTPAdapters component to open Configuration Properties Sheet (CPS).
    1. Enter the value for the host field, for example, https:// adwords.google.com
    2. Enter the port number. Https hosts by default use a port number of 443. If the host uses a different port number then it has to be provided.



  3. Provide SSL Security configurations in the CPS. By default the property SSL Security is not visible. Enable 'expert properties' to make all properties visible.


     
  4. Open SSL Security by clicking on the ellipsis and select the Enable SSL check-box. The SSL related fields gets enabled. Provide the details for the following fields.



    1. Truststore Location - Location and filename of the truststore file. For providing the Truststore, select the truststore.keystore file in \workstudio\keystore that we created in the previous section.
    2. Truststore Password - Password of the specified truststore. Specify trustpass as the truststore password.
    3. Keystore Location - Location and filename of the keystore. Select the client1.keystore file in \workstudio\keystore directory.
    4. Keystore password - Password for the keystore. Specify cl1storepass as the store password.
    5. Keystore Client Key - Password for the client key. Specify cl1keypass as the Keystore Client key.

      Icon

      These are values derived from the process as illustrated in Configure Keystore section.

  5. Accept the default values for the fields whose values are already provided.
  6. Click Next, to move to Interaction Configurations panel and click the HTTP Request Property to open the parameters panel. 
  7. Enter a / (slash) for the URI field.

     
  8. Finish the configuration by navigating through the remaining panels and accepting the default values for each panel.
  9. Connect a feeder and display component with the HTTPAdapters component using routes.


    Figure 4: P2P Connection
     
  10. Double-click the feeder component to display its Configuration Property Sheet (CPS). The CPS is displayed. Now, click the Fetch from Connected Service icon.


     
  11. Click the Next button to navigate to the Options panel. Click the Generate Sample XML button.
     
  12. Accept the default values and click the OK button. From the sample XML that is generated, delete all the XML tags and leave only the <HTTPRequest> opening and closing tags.


     
  13. Click the Finish button to finish the configuration of the feeder.
     
  14. Next, do the Component Resource Check and run the event process. Wait until the components turn green in the Event Process easel. When the event process successfully runs, the feeder window is displayed as shown in the figure below.


     
  15. Click the Send button to send the HTTP request from the feeder to the HTTPAdapters component. The result of the request is displayed in the display business component.

Adaptavist ThemeBuilder EngineAtlassian Confluence