ANSA Composer is capable of acting as either HTTP client (outbound) or HTTP server (inbound). That is:
- As HTTP client, it can send HTTP requests and payloads to an HTTP server and receive the response
- As HTTP server, it is capable of receiving HTTP requests and payloads and responding.
For more information about outbound and inbound HTTP processing refer to the following sections:
HTTP Outbound (Client) Processing in LANSA Composer
HTTP Inbound (Server) Processing in LANSA Composer
In both cases, an HTTP Configuration is used to contain details specific to a particular inbound request or to contain the addressing, credentials and protocol details necessary to send an outbound request. For more information refer to:
Having created the HTTP Configuration, you can use one or more of the HTTP Transport Activities in your Processing Sequence to prepare and send an outbound HTTP request or to receive and respond to an inbound HTTP request.
LANSA Composer provides two sets of HTTP activities:
For simple cases, LANSA Composer provides a set of activities that, in a single operation, can send an outbound HTTP request and receive the response or receive an inbound request and send a response.
These activities are the easiest and quickest to use if all you need to do is to send (or receive) a request with an optional file as payload and receive (or send) the response.
The "simple" HTTP activities are:Retrieves a document from an HTTP server.
Sends data to an HTTP server and/or receives response data from the server.
Handles an inbound HTTP message and saves it to a specific directory.
For more advanced applications, LANSA Composer provides a suite of activities that offer much greater flexibility and capability to handle a wide-range of different styles of HTTP requests.
With this suite of activities, it will be necessary to use more than one of the activities in conjunction in order to prepare and send an outbound HTTP request or to receive and respond to an inbound HTTP request.
The advanced HTTP activities are:Begin HTTP inbound request handling
Begin HTTP outbound request handling
End HTTP request processing
Get inbound multipart component item
Set outbound multipart component item
Get HTTP protocol property value(s)
Set HTTP protocol property value(s)
Receive a single file HTTP payload
Receive HTTP payload as multipart content
Receive HTTP payload as name-value pairs
Reset for further HTTP outbound requests
Send file as response to HTTP request
Send multipart content as response to HTTP request
Send name-value pairs as response to HTTP request
Send status as response to HTTP request
Send request to HTTP server
Send file to HTTP server
Send multipart content to HTTP server
Send name-value pairs to HTTP server