diff options
author | Vadim Revyakin <vadimr@intel.com> | 2007-01-29 12:42:47 +0000 |
---|---|---|
committer | Vadim Revyakin <vadimr@intel.com> | 2007-01-29 12:42:47 +0000 |
commit | b713a21ee8f35e163a610f4ceb82994a69f5f15e (patch) | |
tree | d758c3b33c139e26da39ba92d31233b71ec2bc2e /examples | |
parent | 0117e6866b9becd6a4ff338b71705be27e21ce65 (diff) | |
download | wsmancli-b713a21ee8f35e163a610f4ceb82994a69f5f15e.tar.gz wsmancli-b713a21ee8f35e163a610f4ceb82994a69f5f15e.tar.xz wsmancli-b713a21ee8f35e163a610f4ceb82994a69f5f15e.zip |
Modified client API. Ruby is not fixed
Diffstat (limited to 'examples')
-rw-r--r-- | examples/create_resource.c | 9 | ||||
-rw-r--r-- | examples/serialize.c | 6 | ||||
-rw-r--r-- | examples/win32_service.c | 13 |
3 files changed, 13 insertions, 15 deletions
diff --git a/examples/create_resource.c b/examples/create_resource.c index 043faee..41aa6a2 100644 --- a/examples/create_resource.c +++ b/examples/create_resource.c @@ -159,11 +159,10 @@ int main(int argc, char** argv) d->Handles.count = count; d->Handles.data = array; - doc = ws_transfer_create_serialized(cl, RESOURCE_URI, d, - EXL_ExamplePolicy_TypeInfo, options); - - if (doc) - ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); + doc = ws_transfer_create_serialized(cl, RESOURCE_URI, options, d, + EXL_ExamplePolicy_TypeInfo); + if (doc) + ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); if (uri) { u_uri_free(uri); diff --git a/examples/serialize.c b/examples/serialize.c index 901918c..1ee327a 100644 --- a/examples/serialize.c +++ b/examples/serialize.c @@ -930,10 +930,10 @@ char *data = "<dummy><qq>This is qq body</qq><pp>This is pp</pp></dummy>"; actionOptions options; initialize_action_options(&options); - WsXmlDocH request = wsman_client_create_request(cl, WSMAN_ACTION_TRANSFER_CREATE, - NULL, + WsXmlDocH request = wsman_client_create_request(cl, "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem", - options, NULL); + options, + WSMAN_ACTION_TRANSFER_CREATE, NULL, NULL); WsXmlDocH d = wsman_client_read_memory(cl, data, strlen(data), NULL, 0); ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(d)); // WsXmlNodeH n = ws_xml_get_doc_root(d); diff --git a/examples/win32_service.c b/examples/win32_service.c index 681d350..791b1c5 100644 --- a/examples/win32_service.c +++ b/examples/win32_service.c @@ -165,11 +165,10 @@ static int list_services(WsManClient *cl, WsXmlDocH doc, void *data) CIM_Servie *service = ws_deserialize(wsman_client_get_context(cl), node, CIM_Servie_TypeInfo, CLASSNAME, - RESOURCE_URI, RESOURCE_URI, + RESOURCE_URI, NULL, 0, 0); print_info(service); } - } } @@ -245,15 +244,15 @@ int main(int argc, char** argv) } else if (start && argv[1]) { if (dump) wsman_set_action_option(&options,FLAG_DUMP_REQUEST ); wsman_client_add_selector(&options, "Name", argv[1]); - doc = wsman_invoke(cl, RESOURCE_URI, - "StartService", NULL, options); + doc = wsman_invoke(cl, RESOURCE_URI, options, + "StartService", NULL); ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); ws_xml_destroy_doc(doc); } else if (stop && argv[1]) { if (dump) wsman_set_action_option(&options,FLAG_DUMP_REQUEST ); wsman_client_add_selector(&options, "Name", argv[1]); - doc = wsman_invoke(cl, RESOURCE_URI, - "StopService", NULL, options); + doc = wsman_invoke(cl, RESOURCE_URI, options, + "StopService", NULL); ws_xml_dump_node_tree(stdout, ws_xml_get_doc_root(doc)); ws_xml_destroy_doc(doc); } else if ( argv[1] ) { @@ -267,7 +266,7 @@ int main(int argc, char** argv) CIM_Servie *service = ws_deserialize(wsman_client_get_context(cl), node, CIM_Servie_TypeInfo, CLASSNAME, - RESOURCE_URI, RESOURCE_URI, + RESOURCE_URI, NULL, 0, 0); desc = 1; status = 1; |