Compression/Decompression with the Web Services Invoke Service Activity

During run time, the Web Services Invoke Service activity sends a HTTP request complaint with the HTTP/HTTPS 1.1 protocol to the Web Service. The Invoke Service activity supports compression with the gzip format only and decompression with the gzip or the deflate formats.

Note: The Invoke Service activity does not support the common UNIX file compression format called compress.

The affect of these conditions on the compression/decompression run-time behavior of the Invoke Service activity are described in the following sections and in the tables provided in the Run-time Compression/Decompression Behavior section.

Endpoint Support for Compression/Decompression

The Integration Appliance determines whether or not the HTTP Endpoint supports compression when the Integration Appliance sends the first HTTP request in the compressed format to the HTTP Endpoint (the Web Service), if the Web Service returns an error code indicating that Web Service does not support compression or does not support the specified Content-Encoding type, the Integration Appliance resends the first request in uncompressed format and all subsequent requests to this Endpoint are sent in the uncompressed format. In addition, the HTTP response sent by the Web Service is not decompressed when received by Integration Appliance.

Endpoint support for compression/decompression is represented by the fourth column labeled Endpoint Supports Compression? in the tables provided in the Run-time Compression/Decompression Behavior section.

Content-Encoding and Accept-Encoding Values at the Message Level

The value of the Content-Encoding header in the HTTP request determines if the body of the request is compressed or not using. For the Invoke Service activity, the Integration Appliance sets the Content-Encoding to gzip and sends the body of the request compressed in the gzip format as shown in the second row of the first table labeled Compression Behavior When Sending a Request and in the following figure.

The value of the Accept-Encoding header in the request defines the types of encoding that the HTTP client accepts in the response. For the Invoke Service activity, the Integration Appliance sets the Accept-Encoding equal to gzip,deflate in the request and the Web Service sends the body of the response compressed in either the gzip or the deflate format to the Integration Appliance (acting as a client) as shown in the following figure:

The values of the Accept-Encoding and Content-Encoding headers in the request are used by the Integration Appliance and the Web Service to determine the compression/decompression behavior.

Setting Compression/Decompression at the Activity Level

By default, compression and decompression are turned on at the activity level for the Invoke Service activity.  You can turn off compression/decompression at the activity level by clearing the Use Compression/Decompression check box. The Use Compression/Decompression check box is available in the Configure task of the activity. The second column labeled Use Compression/Decompression check box in the following tables provided in the Run-time Compression/Decompression Behavior section, represents the setting of the Use Compression/Decompression check box.

Deprecation Note: The Use Compression/Decompression check box will be deprecated in a future release. Use the Content-Encoding and Accept-Encoding HTTP Parameters in the HTTP request to specify how to decompresses the body of the HTTP request and compress the body of the HTTP response.

Run-time Compression/Decompression Behavior

The first table provided in the Compression Behavior When Sending a Request section, describes the compression run-time behavior when the Integration Appliance sends a HTTP request to the Web Service.

The second table provided in the Accept-Encoding Header Value Passed to the Request section, describes the value of the Accept-Encoding header passed in the HTTP request.

The third table provided in the Decompression Behavior When Receiving a Response section, describes the decompression run-time behavior when the Integration Appliance receives the HTTP response from the Web Service.

Compression Behavior When Sending a Request

The following table describes the compression run-time behavior when the Integration Appliance sends a HTTP request to the Web Service.
Use Compression/ Decompression Check Box (Activity Level) Content-Encoding Value in the HTTP Request (Message Level) Endpoint Supports Compression? Integration Appliance Compression Run-Time Behavior When Sending a Request
selected gzip yes The Integration Appliance sends the body of the request compressed in the gzip format. The Content-Encoding header is set to gzip in the request.
selected value is not significant no The Integration Appliance sends the body of the  request uncompressed. The Content-Encoding header is set to identity in the request.
cleared value is not significant value is not significant The Integration Appliance sends the body of the request as is (unchanged). The current value of the Content-Encoding header is passed as is in the request

Accept-Encoding Header Value Passed to the Request

The following table describes the value of the Accept-Encoding header passed in the HTTP request.
Use Compression/ Decompression Check Box (Activity Level) Initial Accept-Encoding Value Endpoint Supports Compression? Accept-Encoding Value Passed in the HTTP Request to the Web Service
selected gzip,deflate yes The Accept-Encoding header is set to gzip,deflate in the request.
value is not significant value is not significant no The current value of the Accept-Encoding header is passed as is in the request.
cleared value is not significant value is not significant The current value of the Accept-Encoding header is passed as is in the request.

Decompression Behavior When Receiving a Response

The following table describes the decompression run-time behavior when the Integration Appliance receives the HTTP response from the Web Service.
Use Compression/ Decompression Check Box (Activity Level) Content-Encoding Value in the HTTP Response (Message Level) Endpoint Supports Compression? Integration Appliance Decompression Run-Time Behavior When Receiving a Response
selected gzip yes The Integration Appliance decompresses the body of the response using the gzip format.
selected deflate yes The Integration Appliance decompresses the body of the response using the deflate format.
selected identity yes The Integration Appliance does not decompress the body of the response.
selected value not listed in the Accept-Encoding header yes The Integration Appliance logs an error that the response data was received in an unsolicited content encoding type.
selected value is not significant no The Integration Appliance does not decompress the body of the response. The current value of the Content-Encoding header is passed as is in the response.
cleared value is not significant value is not significant The Integration Appliance does not decompress the body of the response.  The current value of the Content-Encoding header is passed as is in the response.



Feedback | Notices


Timestamp icon Last updated: Wednesday, February 17, 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/WS_Compression_Decompression_with_the_WS_Invoke_Service_Activity.html