Opening a connection to an HTTP server

When making an HTTP client request in CICS® Web support, you must open a connection to the server before sending the first request. CICS returns a session token that represents the connection.

Initiate a connection with the server by issuing a WEB OPEN command as follows:
  1. Specify the host name of the server, the length of the host name, and the scheme that is to be used (HTTP or HTTPS). Also specify the port number for the host if this is other than the default for the specified scheme. You can specify the URIMAP option on the WEB OPEN command to use this information directly from an existing URIMAP definition. Alternatively, you can supply the information using the SCHEME, HOST, HOSTLENGTH and PORTNUMBER options. You can extract these details from a known URL using the WEB PARSE URL command, or from an existing URIMAP definition using the WEB EXTRACT URIMAP command.
  2. If required, specify the CODEPAGE option to change the EBCDIC code page for this connection to something other than the default code page for the local CICS region (set by the LOCALCCSID system initialization parameter). This might be the EBCDIC code page for another national language. When the server returns its response, if conversion is specified, CICS converts the response body into this code page before passing it to the application.
  3. If you are using the HTTPS scheme, specify appropriate security options:
    1. If you need to supply an SSL client certificate, specify the CERTIFICATE option to do this. If you specify the URIMAP option on the WEB OPEN command, you can use this information directly from an existing URIMAP definition.
    2. Use the CIPHERS and NUMCIPHERS options to specify a list of cipher suite codes to be used for the connection. If you specify the URIMAP option on the WEB OPEN command, you can either accept the setting from the URIMAP definition, or specify your own list of cipher suite codes to override the URIMAP specification.
  4. The WEB OPEN command drives the XWBOPEN user exit. You can create a user exit program to make the connection to the server go through a proxy server, or to apply a security policy to a host name, if required. HTTP client open exit XWBOPEN has information to help you do this.
CICS opens the connection with the server, and returns a session token to the application program. CICS also returns information on the HTTP version of the server.
Save the session token and use it on all subsequent commands that relate to this connection.