Apama 10.7.2 | Using Apama with Software AG Designer | Working with Projects | Adding resources to Apama projects | Adding bundles to projects | Adding connectivity and adapter bundles to projects | Adding the HTTP client connectivity plug-in to a project
 
Adding the HTTP client connectivity plug-in to a project
In Apama applications, you can configure and use the HTTP client connectivity plug-in provided with Apama.
*To add the HTTP client connectivity plug-in to a project
1. Add the HTTP client connectivity plug-in as described in Adding connectivity and adapter bundles to projects.
2. In the Connectivity and Adapters dialog, expand the HTTP Client node and select the desired option.
There are several options to choose from:
*an option that uses application-specific event definitions, transports and mapping configurations, and
*an option that uses generic Apama event definitions and a chain configuration to invoke HTTP services with JSON payloads. This option can be added only once and can be used to invoke multiple HTTP services.
In the Project Explorer view, the following files are created in the Connectivity and Adapters > HTTP Client > HTTP_Client_bundle_instance node:
*HTTP_Client_bundle_instance.properties
*HTTP_Client_bundle_instance.yaml
The HTTP_Client_bundle_instance.properties file contains properties for configuring the HTTP client transport.
If you have selected the generic option, the above files are not created. This works without any configuration. All configuration options and mappings are provided at runtime through the EPL application.
3. Optional. If you have not selected the generic option, edit the HTTP_Client_bundle_instance.yaml file to specify more advanced configurations, such as customizing the way HTTP messages are mapped to Apama events, using codecs for converting the message payload, or configuring the HTTP client transport. For more information, see The HTTP Client Transport Connectivity Plug-in.
For the generic option, additional bundles are added to the Dependent Bundles node (you need not make any changes to these bundles). The HTTP client adds a reference to com.apama.util.AnyExtractor which is useful for easily extracting data from an any type; see the API Reference for EPL (ApamaDoc) for more details.