Friday, May 29, 2009

ICM Client Architecture

When an ABAP application program in the SAP system sends an HTTP request to a web server over the Internet, the following steps are performed (explanations beneath the graphic): This graphic is explained in the accompanying textExplanations:

The ABAP application program creates an object of the class CL_HTTP_CLIENT (1).

Note

This is done by calling one of the following methods:CL_HTTP_CLIENT=>CREATE, CL_HTTP_CLIENT=>CREATE_BY_DESTINATION or CL_HTTP_CLIENT=>CREATE_BY_URL.

This object is referred to here as the client control block (similarly to the server control block). The ABAP application program that sends the request calls the method.

Note

The structure of class CL_HTTP_CLIENT is described under Interface IF_HTTP_CLIENT.

Note

Note that the activities in points 2, 3, 5, 6, 7, 11, 12 and 13 must also be triggered by the ABAP application program, that is, by calling the appropriate methods. The ABAP application program therefore uses the components of the class CL_HTTP_CLIENT so that it can generate the request data and process the response data.

If you want the method CL_HTTP_CLIENT=>CREATE to be called, the following information must be provided for this method: HOST (host name),SERVICE (port), PROXY_HOST (host name of the proxy host), PROXY_SERVICE (port of the proxy host) and SCHEME (specifies whether HTTP or HTTPS should be used; has the default value “SCHEMETYPE_HTTP”). If you communicate using the SSL protocol (“SCHEMETYPE_HTTPS”), you can use the parameter SSL_ID to specify appropriate SSL certificates. If you want to use these certificates to log on to an ABAP Application Server, you can use SAP_USERNAME and SAP_CLIENT to specify the additional information that is required.

If you want the method CL_HTTP_CLIENT=>CREATE_BY_DESTINATION to be called, you have to make the corresponding entries in transaction SM59 for the HTTP destination (node HTTP Connections to ABAP System or HTTP Connections to Ext.. Server). For details on the settings, see Connection Establishment Using Destination (SM59).

This graphic is explained in the accompanying text

There is a central configuration environment for making proxy settings in the system. To access it, call transaction SICF and choose Client -> Proxy Settings.

The generated client control block is filled by filling the attribute Request with the required request data (2).

The request is then sent using the method SEND (3). To do this, the connection is opened and the request is converted to a HTTP data stream (serialized).

Task handlers and the Internet Communication Manager are used to send the request to the required HTTP server (4).

If the HTTP server requires authentication (for example, if the server is also an SAP System), the client must now log on (5,6,7,8. If the server is also an SAP System, the client logs on via an SAP logon popup. Otherwise, the client logs on via the HTTP standard popup. The query whether the SAP logon popup or the HTTP standard popup should be used is executed within the method RECEIVE (see 6). If you do not want a logon dialog box for the application, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~PROPERTYTYPE_ LOGON_POPUP.

This graphic is explained in the accompanying text

This authentication is carried out in dialog processes, not in batch processes.

If the service is not accessible with this URL, and the response includes a redirect, the ICF manager will redirect the request to the new URL. If you do not want the application to respond this way, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~PROPERTYTYPE_REDIRECT.

This graphic is explained in the accompanying text

If no proxy information has been specified, the ICF manager also evaluates the central proxy settings for the request. If you do not want the application to respond this way, you can disable it by specifying the value CO_DISABLED for the attribute IF_HTTP_CLIENT~ PROPERTYTYPE_APPLY_SPROXY.

The HTTP server generates a response and sends it back (9,10). When the method RECEIVE is called, the response data is imported and the attribute RESPONSE for the control block is filled (10).

The data is then processed or displayed by accessing the response attribute (11, 12).

Note

It is also possible to transfer the output to the HTML control. In this case, the response is displayed as it would be in a browser.

Once the data has been displayed, the connection is closed using the method CLOSE (13).

This graphic is explained in the accompanying text

Once the method CLOSE has been executed, you can no longer access the Request and Response objects.

This graphic is explained in the accompanying text

Once the application has processed your requests and responses, the connection should be closed using the method CLOSE in order to avoid increased resource consumption.

1 comment:

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

Blog Archive