IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with HTTP

Example of the HTTP binding

Applying the HTTP binding to an application is shown in this example.

Creating and configuring HTTP import or HTTP export bindings is not as simple as using a web browser to access data. The article Configure the SCA HTTP binding to enable real-life scenarios on IBM's developerWorks helps you by providing a sample of the most common scenarios involving this binding.

The application demonstrates how HTTP bindings can be used to make the application consumable by HTTP clients, how to consume an external HTTP XML service, and how to integrate SCA application modules using HTTP. For each scenario, specific configuration points are covered. Also shown, are how to create a custom mediation module and a custom data binding with an HTTP binding.


Scenarios shown in the example

The following scenarios are shown in the example:


Description of the example

The goal of the application is to expose an internal data source named Customers (an XML file) to the web using Web 2.0 technologies: a Google map and an Atom feed. To display the customers' locations in this file on the map, a third party Representational State Transfer (REST) service, geocoder.ca, is used, which returns the latitude and longitude of any address in the United States and Canada.

Two SCA modules, a library module and a client web application, are created in the example. The library module contains a Web Service Description Language (WSDL) interface and business objects. A CustomerLocations mediation module is used to expose the SCA application through HTTP bindings. The mediation module contains two HTTP export binding components (CustomerLocationsExportAsFeed and CustomerLocationsExportAsXML), a custom mediation component (CustomerLocations) that processes a URL query and forwards the request onward to another SCA component, and an HTTP import binding component (GetCustomersWithLocationsHTTPImport) that invokes the Customers module using HTTP.

The Customers module consists of an HTTP import binding (GetCoordinates) used to invoke the external REST service provided by geocoder.ca. It also includes an HTTP export binding component (GetCustomersWithLocationExport) invoked by the HTTP import binding component from the CustomerLocations mediation module, a simple Java™ component that loads an XML file and returns a list of Customers business objects. The HTTP export binding (AddCustomerExport) is used by an external application to add new Customers to the XML repository by using a POST operation to send an XML file over HTTP. A Business Process Execution Language (BPEL) component (GetCustomersWithLocations) ties the application together by invoking the REST service for each customer retrieved from the XML repository.

The HTTPExportToGoogleMap web project contains an HTML page (customersMap.html) that is designed to create a mashup that displays the customers' locations on the Google map. It also allows the filtering of the Customers that get displayed based on their type.

The application also contains another HTML page (addCustomer.html) that allows a user to add new customers to the data source by invoking an HTTP export binding component through the HTTP POST operation.

Hypertext Transfer Protocol (HTTP) binding


Related concepts:
HTTP binding overview
Uses of the HTTP binding
HTTP data bindings


Related tasks:
Generate an HTTP import binding
Generate an HTTP export binding


Related reference:
Limitations of the HTTP binding