The implementation of the WBEM server side of a particular WBEM client is conceptually very simple and the available WBEM server implementations provide code libraries to make the coding very straightforward. These libraries typically provide function calls to connect to and disconnect from the WBEM server and calls for each of the intrinsic functions. Internally, the code generates the necessary CIM-XML, sends it to the WBEM server, receives back the result, de-XMLs it and passes it back to the invoking program. This is all very simple.
Your code does, however, need some understanding of what is happening under the covers because this can seriously affect performance of the system. Because of the single exchange/response nature of HTTP, the basic operation of the WBEM client code when invoked can be summarised as follows :
Discover the whereabouts of the appropriate WBEM server. This is described in more detail below.
Connect to the WBEM server, carrying out whatever authentication is required. This is described in more detail on page 142 and in Chapter 7.
Issue a request and wait for the reply. This is described in more detail in Chapter 7.
Process the response by passing it to the operator or higher-level management system.
Repeat from step 2.
Because of the single request/response nature of HTTP, it is necessary to repeat the authentication step for each request.
This sequence can be varied slightly by using the HTTPS protocol where authentication can be carried out once and multiple commands be issued.