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:

HTTP Configuration Details

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:

    HTTP_SIMPLE_GET

    Retrieves a document from an HTTP server.

    HTTP_SIMPLE_POST

    Sends data to an HTTP server and/or receives response data from the server.

    HTTP_SIMPLE_INBOUND

    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:

    HTTP_BEGIN_INBOUND

    Begin HTTP inbound request handling

    HTTP_BEGIN_OUTBOUND

    Begin HTTP outbound request handling

    HTTP_END

    End HTTP request processing

    HTTP_MULTIPART_GET

    Get inbound multipart component item

    HTTP_MULTIPART_SET

    Set outbound multipart component item

    HTTP_PROPERTY_GET

    Get HTTP protocol property value(s)

    HTTP_PROPERTY_SET

    Set HTTP protocol property value(s)

    HTTP_RECEIVE_FILE

    Receive a single file HTTP payload

    HTTP_RECEIVE_MULTI

    Receive HTTP payload as multipart content

    HTTP_RECEIVE_NAMEVAL

    Receive HTTP payload as name-value pairs

    HTTP_RESET

    Reset for further HTTP outbound requests

    HTTP_RESPOND_FILE

    Send file as response to HTTP request

    HTTP_RESPOND_MULTI

    Send multipart content as response to HTTP request

    HTTP_RESPOND_NAMEVAL

    Send name-value pairs as response to HTTP request

    HTTP_RESPOND_STATUS

    Send status as response to HTTP request

    HTTP_SEND

    Send request to HTTP server

    HTTP_SEND_FILE

    Send file to HTTP server

    HTTP_SEND_MULTI

    Send multipart content to HTTP server

    HTTP_SEND_NAMEVAL

    Send name-value pairs to HTTP server

  • No labels