diff options
author | Anas Nashif <nashif@intel.com> | 2007-02-22 18:14:33 +0000 |
---|---|---|
committer | Anas Nashif <nashif@intel.com> | 2007-02-22 18:14:33 +0000 |
commit | d90af80c99bed6b3bb722f5387b034d08879f550 (patch) | |
tree | 6a565f7462fb67915049b782e9a0d5a7ed124c3e | |
parent | 05c98b2703b7b24b11ea1ae218f06b34e14e2d02 (diff) | |
download | wsmancli-d90af80c99bed6b3bb722f5387b034d08879f550.tar.gz wsmancli-d90af80c99bed6b3bb722f5387b034d08879f550.tar.xz wsmancli-d90af80c99bed6b3bb722f5387b034d08879f550.zip |
revert serializatin changes until vadim is back
removed debug output
-rw-r--r-- | examples/serialize.c | 34 | ||||
-rw-r--r-- | examples/wsmid_identify.c | 3 |
2 files changed, 9 insertions, 28 deletions
diff --git a/examples/serialize.c b/examples/serialize.c index cf481d6..59088db 100644 --- a/examples/serialize.c +++ b/examples/serialize.c @@ -173,26 +173,8 @@ if you want to skip the elements while deserialization(serialization). If define SER_INOUT_* is used the element is skipped always. - SER_* defines create elements with default namespace prefix. Initialy this - prefix is abcent, i.e. QNames created without namespace prefix. If element name is a QName (with name space prefix) the SER_NS_*(ns, name, ..) define set must be used. - There is an optimization to create many elements with the same namespace - prefix. SER_* defines create elements with default namespace prefix. - Initialy this prefix is abcent, i.e. QNames created without namespace prefix. - macro SER_DEFAULT_NS(<ns>) does not describe any real element but sets - default namespace to <ns>. So all SER_* defines after SER_DEFAULT_NS(<ns>) - will create elements with namespace <ns>. SER_DEFAULT_NS(NULL) disables - default name prefix. SER_NS_*(NULL, name) define describes the element - without namespace prefix in any case. - - If element has attributes it must be described in TS by the special structure. - For example XML_TYPE_UINT8 with attributes is described as: - struct {XML_TYPE_UINT8 body; XML_NODE_ATTR *attrs;} - Here attrs is a NULL terminated list XML_NODE_ATTR holding name, - namespace and value of attribute. - Such structures are described by special macros SER_ATTR_* or SER_ATTR_NS_* - in TDO. @@ -268,14 +250,13 @@ Sample_Servie servie = { SER_START_ITEMS(Sample_Servie) SER_BOOL("AcceptPause", 1), SER_BOOL("AcceptStop", 1), -SER_DEFAULT_NS(XML_NS_WSMAN_ID), SER_STR("Caption", 1), SER_UINT32("CheckPoint", 1), SER_STR("CreationClassName", 1), SER_STR("Description", 1), SER_BOOL("DesktopInteract", 1), SER_NS_STR(EX1_NS, "DisplayName", 1), -SER_NS_STR(NULL, "ErrorControl", 1), +SER_STR("ErrorControl", 1), SER_UINT32("ExitCode", 1), SER_STR("InstallDate", 1), SER_STR("Name", 1), @@ -283,7 +264,6 @@ SER_STR("PathName", 1), SER_UINT32("ProcessId", 1), SER_UINT32("ServiceSpecificExitCode", 1), SER_STR("ServiceType", 1), -SER_DEFAULT_NS(NULL), SER_BOOL("Started", 1), SER_STR("StartMode", 1), SER_STR("StartName", 1), @@ -697,15 +677,15 @@ example6() str_attrs[1].next = &str_attrs[2]; SER_START_ITEMS(Dummy) - SER_ATTR_UINT8("UINT8", 1), - SER_ATTR_UINT16("UINT16", 1), - SER_ATTR_UINT32("UINT32", 1), - SER_ATTR_BOOL("BOOL", 1), - SER_ATTR_STR("STRING", 1), + SER_ATTR_NS_UINT8_FLAGS(NULL, "UINT8", 1, 0), + SER_ATTR_NS_UINT16_FLAGS(NULL, "UINT16", 1, 0), + SER_ATTR_NS_UINT32_FLAGS(NULL, "UINT32", 1, 0), + SER_ATTR_NS_BOOL_FLAGS(NULL, "BOOL", 1, 0), + SER_ATTR_NS_STR_FLAGS(NULL, "STRING", 1, 0), SER_END_ITEMS(Dummy); SER_START_ITEMS(Sample) - SER_ATTR_NS_STRUCT(XML_NS_WS_MAN, "STRUCT", 1, Dummy), + SER_ATTR_NS_STRUCT_FLAGS(XML_NS_WS_MAN, "STRUCT", 1, 0, Dummy), SER_END_ITEMS(Sample); WsContextH cntx; diff --git a/examples/wsmid_identify.c b/examples/wsmid_identify.c index d899482..654c9eb 100644 --- a/examples/wsmid_identify.c +++ b/examples/wsmid_identify.c @@ -109,13 +109,14 @@ int main(int argc, char** argv) return 1; } - +/* fprintf( stderr, "wsman_create_client( host %s, port %d, path %s, scheme %s, user %s, passwd %s\n", uri->host, uri->port, uri->path, uri->scheme, uri->user, uri->pwd); + */ cl = wsman_create_client( uri->host, uri->port, |