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. In the Project Explorer view, right-click the project and select New > Connectivity and Adapters or Apama > Add Connectivity and Adapters.
2. In the Connectivity and Adapters dialog, select one of the following:
HTTP Client - Uses application-specific event definitions, transports and mapping configurations.
HTTP Client Generic - 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 Generic (Generic event definitions - Mapping application content in EPL) > HTTPClientGeneric node or in the Connectivity and Adapters > HTTP Client (Application-specific event definitions - Mapping to application events in YAML) > HTTPClientn node, depending on your selection:
HTTPClientn.properties HTTPClientn.yaml or
HTTPClientGeneric.properties HTTPClientGeneric.yaml If you have selected the HTTP Client Generic bundle, you should not update these files because all configuration options and mappings are provided at runtime through the EPL application.
The .properties file contains properties for configuring the HTTP client transport.
3. Optional. If you have not selected the HTTP Client Generic bundle, edit the .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
HTTP Client Generic bundle, 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.