HP WBEM Services for HP-UX System Administrator Guide (5900-1624, April 2011)

B Sample client request
This appendix provides a sample of a client request and the response.
The request is for the EnumerateInstances operation on the PG_OperatingSystem class.
Requests and responses are encoded in XML. For more information about XML, see http://
www.dmtf.org/standards/WBEM.
The information is represented in a table format. The first column has line numbers for the actual
request and response. The middle column can group several related lines. The right-hand column
is a comment on the corresponding middle column.
The first part is the request which spans to about 16 lines. The request is followed by the response,
which is actually 172 lines long, but lines 81 to 170 have been omitted for brevity.
Example request
Table 5 EnumerateInstances Request for PG_OperatingSystem Class
Begin specifying that this is
an XML-encoded CIM
message. (See end at line 15
and 16)
<?xml version=1.0 ?>1
<CIM CIMVERSION=2.0 DTDVERSION=2.0>2
<MESSAGE ID=51000 PROTOCOLVERSION=1.0>3
This is a simple request for the
operation: method
EnumerateInstances
<SIMPLEREQ>4
<IMETHODCALL NAME=EnumerateInstances>5
Line 6 begins (and 9 ends)
specifying the /root/cimv2
namespace for the CIM
operation
<LOCALNAMESPACEPATH>6
<NAMESPACE NAME=root/>7
<NAMESPACE NAME=cimv2/>8
</LOCALNAMESPACEPATH>9
Line 10 begins (and 12 ends)
specifying the class name
(required) for
EnumerateInstances:
PG_OperatingSystem
<IPARAMVALUE NAME=ClassName>10
<CLASSNAME NAME=PG_OperatingSystem/>11
</IPARAMVALUE>12
Ending of the method call and
simple request.
</IMETHODCALL>13
</SIMPLEREQ>14
Ending of the CIM operation
request message.
</MESSAGE>15
</CIM>16
Lines 1-3: This is checked when the request comes to the HTTP Server. At this point, several
things have to happen to continue:
The client must be able to connect to the system on the authorized port.
CIM Server must be running.
The user/password pair must pass authorization.
The request must have a properly formed header.
When the request is parsed, it must not contain xml errors.
Lines 4 and 5: At this point, HP WBEM Services considers the operation that is requested. If
it is a supported operation, the process continues.
54 Sample client request