Additional HTTP transport properties for Web services applications

This topic defines additional HTTP transport properties for Web services applications. The additional properties can be used to manage the connection pool for HTTP outbound connections, configure the content encoding of the HTTP message, enable HTTP persistent connection, and resend the HTTP request when a timeout occurs.

 

Properties that manage the connection pool for Web services

HTTP outbound connections

For information about how to configure these properties see Configuring additional HTTP transport properties using the administrative console.

Note: These properties can only be configured as JVM custom properties.

Establishing a connection is an expensive operation. Connection pooling improves performance by avoiding the overhead of creating and disconnecting connections. When an application invokes a Web service over an HTTP transport, the HTTP outbound connector for the Web service locates and uses an existing connection from a pool of connections. When the response is received, the connector returns the connection to the connection pool for reuse. The overhead to create and disconnect the connection is avoided.

The following properties are only configured as JVM custom properties that manage the connection pool for HTTP outbound connections for Web services applications:

  • com.ibm.websphere.webservices.http.connectionTimeout

    This property specifies the interval, in seconds, that a connection request times-out and the WebServicesFault( "Connection timed out" ) error occurs. You can configure the property only as a JVM custom property. The value affects all of the HTTP connection requests made by the HTTP outbound connector. The wait time is needed when the maximum number of connections in the connection pool is reached. For example, if the property is set to 300 and the maximum number of connections is reached, the connector waits for 300 seconds until a connection is available. After 300 seconds, the WebServicesFault( "Connection timed out" ) error occurs if a connection is not available. If the property is set to 0 (zero), the connector waits until a connection is available.

    If the WebServicesFault( "Connection timed out") error occurs in the application, set the com.ibm.websphere.webservices.http.connectionTimeout property value higher. Also, review the application usage. If the com.ibm.websphere.webservices.http.maxConnection property value is set to 0 (zero), and is enabled for an unlimited number of connections, the com.ibm.websphere.webservices.http.connectionTimeout property value is ignored.

    Data type Integer
    Units Seconds
    Default 300
    Range 0 (zero) to the maximum integer

  • com.ibm.websphere.webservices.http.maxConnection

    This property specifies the maximum number of connections that are created in the HTTP outbound connector connection pool. One can configure the property only as a JVM custom property. It affects all of the Web services HTTP connections that are made within one JVM. When the maximum number of connections is reached, no new connection are created and the HTTP connector waits for a current connection to return to the connection pool. If the HTTP connector does not wait for a current connection because of a connection request timeout, the WebServicesFault( "Connection timed out" ) error occurs. For example, if the property is set to 5, and there are 5 connections in use, the HTTP connector waits for the specified time set in the com.ibm.websphere.webservices.http.connectionTimeout property for a connection to become available.

    If the property is set to 0 (zero), the com.ibm.websphere.webservices.http.connectionTimeout property is ignored. The connector attempts to create as many connections allowed by the system.

    Data type Integer
    Default 50
    Range 0 (zero) to the maximum integer

  • com.ibm.websphere.webservices.http.connectionPoolCleanUp

    This property specifies the interval, in seconds, between runs of the connection pool maintenance thread. One can configure the property only as a JVM custom property. This property affects all HTTP connections for Web Services made within one JVM. For example, if the property is set to 180, the pool maintenance thread runs every 180 seconds. When the pool maintenance thread runs, the connector discards any connections remaining idle for longer than the time set in the com.ibm.websphere.webservices.http.connectionIdleTimeout property.

    Data type Integer
    Units Seconds
    Default 180
    Range 0 (zero) to the maximum integer

  • com.ibm.websphere.webservices.http.connectionIdleTimeout

    This property specifies the interval, in seconds, after an idle connection is discarded. One can configure the property only as a JVM custom property. For example, if the property is set to 120, the pool maintenance thread discards any connection that remains idle for 2 minutes. This property affects all Web services HTTP connections made within one JVM.

    Data type Integer
    Units Seconds
    Default 5
    Range 0 (zero) to the maximum integer

 

Additional HTTP transport properties

Additional HTTP transport properties can also be configured for Web services applications.

For more information about how to configure these properties see Configuring additional HTTP transport properties using wsadmin, and Configuring additional HTTP transport properties using an assembly tool.

The following are additional HTTP transport properties that can be configured:

  • com.ibm.websphere.webservices.http.requestContentEncoding

    This property specifies the type of encoding to use in the message of each HTTP outbound request. Supported encoding formats follow the HTTP 1.1 protocol specification including gzip, x-gzip, and deflate. If this property is configured, the headers "Content-Encoding" and "Accept-Encoding" in the HTTP request are also set to the same value. For example, if the property is set to gzip, the headers become Content-Encoding: gzip and Accept-Encoding: gzip. However, if the property is not set, the HTTP request message is not encoded. The default is no encoding.

    You should check if the target Web server is capable of decoding the configured coding format. For example, if the property is set to gzip, the target Web server must also support the gzip encoding. Otherwise, a failure can occur and a status code of 415 Unsupported Media Type might display.

    The compress encoding format is not supported and x-gzip encoding is equivalent to gzip encoding.

    Data type String
    Valid values gzip, x-gzip, and deflate

  • com.ibm.websphere.webservices.http.responseContentEncoding

    This property specifies the type of encoding to be used in the message of each HTTP response. Supported encoding formats follow the HTTP 1.1 protocol specification including gzip, x-gzip, and deflate. If this property is configured, the headers "Content-Encoding" in the HTTP response is set to the same value. If the property is not set, the HTTP response message content is not encoded. The default value is no encoding.

    If the property is set, the request client must also support the same encoding. Otherwise, a failure can occur and a WebServicesFault() error displays.

    The compress encoding format is not supported and x-gzip encoding is equivalent to gzip encoding.

  • Data type String
    Valid values gzip, x-gzip, or deflate

  • com.ibm.websphere.webservices.http.connectionKeepAlive

    This property specifies whether the connector should maintain a live or persistent HTTP connection. If the property is set to true, the connector keeps the connection in the connection pool and reuses the connection for subsequent HTTP requests. However, the connection is closed if syncTimeout(Read timeout) is reached or the server has dropped the connection. Also, an idle connection is closed by the pool maintenance thread if the idle time has passed the connection idle time-out. If the property is set to false, the connection is closed after the HTTP request is sent. If a new request is ready to send and the connection does not exist, the HTTP connector creates one.

    Data type String
    Default True
    Valid values True, false

  • com.ibm.websphere.webservices.http.requestResendEnabled

    This property tells the HTTP connector to resend the SOAP message over HTTP request after a java.net.ConnectException: read timed out error is logged. The java.net.ConnectException is caused by a socket time-out, or when a server shuts down while the request is being sent. If the property is enabled, the connector tries to reconnect one time only and resends the same SOAP message over HTTP. Otherwise, the connector stops sending the SOAP message and a WebServicesFault error is logged.

    Problems can occur with the application this property is enabled. The HTTP request that is resent can be received twice by the server and can cause an unexpected result.

    Data type String
    Default False
    Valid values True, false

  • http.proxyHost

    This property specifies the host name of an HTTP proxy.

    Data type String

  • http.proxyPort

    This property specifies the port of an HTTP proxy.

    Data type String

  • https.proxyHost

    This property specifies the host name of an HTTPS proxy.

    Data type String

  • https.proxyPort

    This property specifies the port of an HTTPS proxy.

    Data type String