Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

Wen Chen

Hi,

 

Openwsman-1.0.1

Wsmancli-1.0.1

 

When following the example in wsmancli/examples/create_resource.c to create instances, I have encountered a problem – missingValues=WSMAN_DETAIL_MISSING_VALUES.  For instance, I have a CIM Class that I want to instantiate:

namespace=root/cimv2 class=Aca_Command

class Aca_Command

{

  [Key] string id;

   string data;

   …

}

 

My client code looks like this:

struct __ACA_COMMAND {

  XML_TYPE_STR id;

  XML_TYPE_STR data;

};

typedef struct __ACA_COMMAND ACA_Command;

SER_START_ITEMS(ACA_Command)

SER_STR("id", 1),

SER_STR("data", 1),

SER_END_ITEMS(ACA_Command);

actionOptions *options;

options = initialize_action_options();

options->max_envelope_size = 51200;

    options->timeout = 60000;

    options->cim_ns="root/cimv2";

 

    ACA_Command *d = u_malloc(sizeof(ACA_Command));

    d->id = u_strdup("some command id");

    d->data = u_strdup("some command");

 

    doc = ws_transfer_create_serialized(cl, COMMAND_URI, options,  d, ACA_Command_TypeInfo);

 

Notice, I am trying to pass in the CIM namespace from options->cim_ns.  I am setting the namespace here because I don’t see anywhere else I can pass this in.

 

Now, the problem is, wsmand thinks WSMAN_DETAIL_MISSING_VALUES.  The place wsmand detects this problem is in wsman-xml.c:ws_xml_is_node_qname(…).  Or more specifically, ws_xml_is_node_qname(…) gets NULL from its call to ws_xml_get_node_name_ns(..).  And, when inspecting the content of the XML node, we see that node->ns is NULL.

 

(gdb) p (xmlNode)*node

$5 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x8062a3d "id", children = 0x8063a30,

  last = 0x8063a30, parent = 0x80639b0, next = 0x8063a88, prev = 0x0, doc = 0x8062cc8,

  ns = 0x0, content = 0x0, properties = 0x0, nsDef = 0x0, psvi = 0x0, line = 2, extra = 0}

 

(gdb) backtrace

#0  ws_xml_is_node_qname (node=0x80639f0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    name=0x8075768 "id") at wsman-xml.c:892

#1  0xb7d966a8 in ws_xml_get_child (parent=0x80639b0, index=0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    localName=0x8075768 "id") at wsman-xml.c:866

#2  0xb7ab08f8 in cim_create_instance (client=0x8062d60, cntx=0x8060788, in_body=0x8063970,

    body=0x8075350, status=0xb725bd00) at sfcc-interface.c:1383

#3  0xb7eef3b9 in CimResource_Create_EP (op=0x80605d8, appData=0xb7ef21c8)

at cim_data_stubs.c:549

 

Please advice if my client code is missing something, or there is a bug in wsmand.  Please advice a work around.

 

Thanks,

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Friday, April 20, 2007 5:48 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Wen,

 

The resource URI is not related to the CIM namespace, see the mapping specification (section 5.1):

 

CIM namespaces are not reflected in the ResourceURI structure, which is independent of where the class resides or is implemented.

 

 


From: Wen Chen [mailto:[hidden email]]
Sent: Saturday, April 21, 2007 8:43 AM
To: [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Got it.  The custom namespace needs to be explicitly spelled out in openwsman.conf.  For instance,

 

vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2,Aca=http://schema.teneros.com/wbem/wscim/1/cim-schema/2

 

What is not apparent is that even though my Aca_XXX and CIM_XXX classes are under the same CIM root/cimv2 namespace, openwsman requires them split up into two separate namespaces just because of the naming convention.

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Wednesday, April 18, 2007 10:39 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

You will need to configure openwsman to recognize your CIM classes in the openwsman configuration file (openwsman.conf) and add a custom namespace to address resource URIs.

I sent an email about this some time ago (see openwsman-devel archive).

 

Anas

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Wen Chen
Sent: Wednesday, April 18, 2007 10:37 AM
To: [hidden email]
Subject: [Openwsman-devel] Enum Problem new CIM Classes

 

Hi,

 

I have an Openwsman-1.0.1.  The CIMOM is openpegasus-2.6. 

 

I can enumerate successfully with standard root/cimv2 classes, such as CIM_OperationSystem and CIM_ComputerSystem.  But, when it comes to the CIM classes I have defined (also in root/cimv2), I consistently run into “DestinationUnreachable” error.  And, by tail –f the CIMOM’s log file, I can tell that the enumerate requests did not get to the CIMOM for my classes.

 

Here is an example request, where Aca_Command is my root/cimv2 class.  I am wondering if I need to load my mof into Openwsman.  But, I have no information on this subject.  Please advice.

 

*Request:*

CLASS=Aca_Command

wsman enumerate  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CLASS} --port 8889 --username testuser1 -p testuser1 -h localhost --namespace root/cimv2

 

*Response:*

<?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas\

.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/w\

sman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>

    <wsa:RelatesTo>uuid:3b3c8e86-2e4c-1e4c-8002-010001565000</wsa:RelatesTo>

    <wsa:MessageID>uuid:3b3cc879-2e4c-1e4c-8015-010001565000</wsa:MessageID>

  </s:Header>

  <s:Body>

    <s:Fault>

      <s:Code>

              <s:Value>s:Sender</s:Value>

        <s:Subcode>

          <s:Value>wsa:DestinationUnreachable</s:Value>

        </s:Subcode>

      </s:Code>

      <s:Reason>

        <s:Text xml:lang="en">No route can be determined to reach the destination role \

defined by the WS-Addressing To.</s:Text>

      </s:Reason>

      <s:Detail>

        <wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/Inval\

idResourceURI</wsman:FaultDetail>

      </s:Detail>

    </s:Fault>

  </s:Body>

</s:Envelope>

Connection failed. response code = 400


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

Nashif, Anas

It seems the example was not up to date, I updated it with the namespaces, see

 

http://openwsman.svn.sourceforge.net/viewvc/openwsman/wsmancli/branches/wsmancli-1.0.0/examples/create_resource.c?revision=1285&view=markup

 

for the latest revision and try again please.

 

Anas

 


From: Wen Chen [mailto:[hidden email]]
Sent: Monday, April 23, 2007 3:25 PM
To: Nashif, Anas; [hidden email]
Subject: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

Hi,

 

Openwsman-1.0.1

Wsmancli-1.0.1

 

When following the example in wsmancli/examples/create_resource.c to create instances, I have encountered a problem – missingValues=WSMAN_DETAIL_MISSING_VALUES.  For instance, I have a CIM Class that I want to instantiate:

namespace=root/cimv2 class=Aca_Command

class Aca_Command

{

  [Key] string id;

   string data;

   …

}

 

My client code looks like this:

struct __ACA_COMMAND {

  XML_TYPE_STR id;

  XML_TYPE_STR data;

};

typedef struct __ACA_COMMAND ACA_Command;

SER_START_ITEMS(ACA_Command)

SER_STR("id", 1),

SER_STR("data", 1),

SER_END_ITEMS(ACA_Command);

actionOptions *options;

options = initialize_action_options();

options->max_envelope_size = 51200;

    options->timeout = 60000;

    options->cim_ns="root/cimv2";

 

    ACA_Command *d = u_malloc(sizeof(ACA_Command));

    d->id = u_strdup("some command id");

    d->data = u_strdup("some command");

 

    doc = ws_transfer_create_serialized(cl, COMMAND_URI, options,  d, ACA_Command_TypeInfo);

 

Notice, I am trying to pass in the CIM namespace from options->cim_ns.  I am setting the namespace here because I don’t see anywhere else I can pass this in.

 

Now, the problem is, wsmand thinks WSMAN_DETAIL_MISSING_VALUES.  The place wsmand detects this problem is in wsman-xml.c:ws_xml_is_node_qname(…).  Or more specifically, ws_xml_is_node_qname(…) gets NULL from its call to ws_xml_get_node_name_ns(..).  And, when inspecting the content of the XML node, we see that node->ns is NULL.

 

(gdb) p (xmlNode)*node

$5 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x8062a3d "id", children = 0x8063a30,

  last = 0x8063a30, parent = 0x80639b0, next = 0x8063a88, prev = 0x0, doc = 0x8062cc8,

  ns = 0x0, content = 0x0, properties = 0x0, nsDef = 0x0, psvi = 0x0, line = 2, extra = 0}

 

(gdb) backtrace

#0  ws_xml_is_node_qname (node=0x80639f0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    name=0x8075768 "id") at wsman-xml.c:892

#1  0xb7d966a8 in ws_xml_get_child (parent=0x80639b0, index=0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    localName=0x8075768 "id") at wsman-xml.c:866

#2  0xb7ab08f8 in cim_create_instance (client=0x8062d60, cntx=0x8060788, in_body=0x8063970,

    body=0x8075350, status=0xb725bd00) at sfcc-interface.c:1383

#3  0xb7eef3b9 in CimResource_Create_EP (op=0x80605d8, appData=0xb7ef21c8)

at cim_data_stubs.c:549

 

Please advice if my client code is missing something, or there is a bug in wsmand.  Please advice a work around.

 

Thanks,

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Friday, April 20, 2007 5:48 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Wen,

 

The resource URI is not related to the CIM namespace, see the mapping specification (section 5.1):

 

CIM namespaces are not reflected in the ResourceURI structure, which is independent of where the class resides or is implemented.

 

 


From: Wen Chen [mailto:[hidden email]]
Sent: Saturday, April 21, 2007 8:43 AM
To: [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Got it.  The custom namespace needs to be explicitly spelled out in openwsman.conf.  For instance,

 

vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2,Aca=http://schema.teneros.com/wbem/wscim/1/cim-schema/2

 

What is not apparent is that even though my Aca_XXX and CIM_XXX classes are under the same CIM root/cimv2 namespace, openwsman requires them split up into two separate namespaces just because of the naming convention.

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Wednesday, April 18, 2007 10:39 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

You will need to configure openwsman to recognize your CIM classes in the openwsman configuration file (openwsman.conf) and add a custom namespace to address resource URIs.

I sent an email about this some time ago (see openwsman-devel archive).

 

Anas

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Wen Chen
Sent: Wednesday, April 18, 2007 10:37 AM
To: [hidden email]
Subject: [Openwsman-devel] Enum Problem new CIM Classes

 

Hi,

 

I have an Openwsman-1.0.1.  The CIMOM is openpegasus-2.6. 

 

I can enumerate successfully with standard root/cimv2 classes, such as CIM_OperationSystem and CIM_ComputerSystem.  But, when it comes to the CIM classes I have defined (also in root/cimv2), I consistently run into “DestinationUnreachable” error.  And, by tail –f the CIMOM’s log file, I can tell that the enumerate requests did not get to the CIMOM for my classes.

 

Here is an example request, where Aca_Command is my root/cimv2 class.  I am wondering if I need to load my mof into Openwsman.  But, I have no information on this subject.  Please advice.

 

*Request:*

CLASS=Aca_Command

wsman enumerate  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CLASS} --port 8889 --username testuser1 -p testuser1 -h localhost --namespace root/cimv2

 

*Response:*

<?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas\

.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/w\

sman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>

    <wsa:RelatesTo>uuid:3b3c8e86-2e4c-1e4c-8002-010001565000</wsa:RelatesTo>

    <wsa:MessageID>uuid:3b3cc879-2e4c-1e4c-8015-010001565000</wsa:MessageID>

  </s:Header>

  <s:Body>

    <s:Fault>

      <s:Code>

              <s:Value>s:Sender</s:Value>

        <s:Subcode>

          <s:Value>wsa:DestinationUnreachable</s:Value>

        </s:Subcode>

      </s:Code>

      <s:Reason>

        <s:Text xml:lang="en">No route can be determined to reach the destination role \

defined by the WS-Addressing To.</s:Text>

      </s:Reason>

      <s:Detail>

        <wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/Inval\

idResourceURI</wsman:FaultDetail>

      </s:Detail>

    </s:Fault>

  </s:Body>

</s:Envelope>

Connection failed. response code = 400


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

Wen Chen

Thanks Anas,

 

The C API works.

 

I’d like follow this up by asking for any samples that make use of the WsmanClientNamespace::Create(…) API.  This call takes the whole object as a string.  It’ll be helpful to learn how to generate this string for an instance of my AcaCommand class.

class Aca_Command{  [Key] string id;   string data;   …}

 

Regards,

 

Wen

 

 


From: Nashif, Anas [mailto:[hidden email]]
Sent: Monday, April 23, 2007 12:38 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

It seems the example was not up to date, I updated it with the namespaces, see

 

http://openwsman.svn.sourceforge.net/viewvc/openwsman/wsmancli/branches/wsmancli-1.0.0/examples/create_resource.c?revision=1285&view=markup

 

for the latest revision and try again please.

 

Anas

 


From: Wen Chen [mailto:[hidden email]]
Sent: Monday, April 23, 2007 3:25 PM
To: Nashif, Anas; [hidden email]
Subject: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

Hi,

 

Openwsman-1.0.1

Wsmancli-1.0.1

 

When following the example in wsmancli/examples/create_resource.c to create instances, I have encountered a problem – missingValues=WSMAN_DETAIL_MISSING_VALUES.  For instance, I have a CIM Class that I want to instantiate:

namespace=root/cimv2 class=Aca_Command

class Aca_Command

{

  [Key] string id;

   string data;

   …

}

 

My client code looks like this:

struct __ACA_COMMAND {

  XML_TYPE_STR id;

  XML_TYPE_STR data;

};

typedef struct __ACA_COMMAND ACA_Command;

SER_START_ITEMS(ACA_Command)

SER_STR("id", 1),

SER_STR("data", 1),

SER_END_ITEMS(ACA_Command);

actionOptions *options;

options = initialize_action_options();

options->max_envelope_size = 51200;

    options->timeout = 60000;

    options->cim_ns="root/cimv2";

 

    ACA_Command *d = u_malloc(sizeof(ACA_Command));

    d->id = u_strdup("some command id");

    d->data = u_strdup("some command");

 

    doc = ws_transfer_create_serialized(cl, COMMAND_URI, options,  d, ACA_Command_TypeInfo);

 

Notice, I am trying to pass in the CIM namespace from options->cim_ns.  I am setting the namespace here because I don’t see anywhere else I can pass this in.

 

Now, the problem is, wsmand thinks WSMAN_DETAIL_MISSING_VALUES.  The place wsmand detects this problem is in wsman-xml.c:ws_xml_is_node_qname(…).  Or more specifically, ws_xml_is_node_qname(…) gets NULL from its call to ws_xml_get_node_name_ns(..).  And, when inspecting the content of the XML node, we see that node->ns is NULL.

 

(gdb) p (xmlNode)*node

$5 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x8062a3d "id", children = 0x8063a30,

  last = 0x8063a30, parent = 0x80639b0, next = 0x8063a88, prev = 0x0, doc = 0x8062cc8,

  ns = 0x0, content = 0x0, properties = 0x0, nsDef = 0x0, psvi = 0x0, line = 2, extra = 0}

 

(gdb) backtrace

#0  ws_xml_is_node_qname (node=0x80639f0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    name=0x8075768 "id") at wsman-xml.c:892

#1  0xb7d966a8 in ws_xml_get_child (parent=0x80639b0, index=0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    localName=0x8075768 "id") at wsman-xml.c:866

#2  0xb7ab08f8 in cim_create_instance (client=0x8062d60, cntx=0x8060788, in_body=0x8063970,

    body=0x8075350, status=0xb725bd00) at sfcc-interface.c:1383

#3  0xb7eef3b9 in CimResource_Create_EP (op=0x80605d8, appData=0xb7ef21c8)

at cim_data_stubs.c:549

 

Please advice if my client code is missing something, or there is a bug in wsmand.  Please advice a work around.

 

Thanks,

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Friday, April 20, 2007 5:48 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Wen,

 

The resource URI is not related to the CIM namespace, see the mapping specification (section 5.1):

 

CIM namespaces are not reflected in the ResourceURI structure, which is independent of where the class resides or is implemented.

 

 


From: Wen Chen [mailto:[hidden email]]
Sent: Saturday, April 21, 2007 8:43 AM
To: [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Got it.  The custom namespace needs to be explicitly spelled out in openwsman.conf.  For instance,

 

vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2,Aca=http://schema.teneros.com/wbem/wscim/1/cim-schema/2

 

What is not apparent is that even though my Aca_XXX and CIM_XXX classes are under the same CIM root/cimv2 namespace, openwsman requires them split up into two separate namespaces just because of the naming convention.

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Wednesday, April 18, 2007 10:39 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

You will need to configure openwsman to recognize your CIM classes in the openwsman configuration file (openwsman.conf) and add a custom namespace to address resource URIs.

I sent an email about this some time ago (see openwsman-devel archive).

 

Anas

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Wen Chen
Sent: Wednesday, April 18, 2007 10:37 AM
To: [hidden email]
Subject: [Openwsman-devel] Enum Problem new CIM Classes

 

Hi,

 

I have an Openwsman-1.0.1.  The CIMOM is openpegasus-2.6. 

 

I can enumerate successfully with standard root/cimv2 classes, such as CIM_OperationSystem and CIM_ComputerSystem.  But, when it comes to the CIM classes I have defined (also in root/cimv2), I consistently run into “DestinationUnreachable” error.  And, by tail –f the CIMOM’s log file, I can tell that the enumerate requests did not get to the CIMOM for my classes.

 

Here is an example request, where Aca_Command is my root/cimv2 class.  I am wondering if I need to load my mof into Openwsman.  But, I have no information on this subject.  Please advice.

 

*Request:*

CLASS=Aca_Command

wsman enumerate  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CLASS} --port 8889 --username testuser1 -p testuser1 -h localhost --namespace root/cimv2

 

*Response:*

<?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas\

.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/w\

sman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>

    <wsa:RelatesTo>uuid:3b3c8e86-2e4c-1e4c-8002-010001565000</wsa:RelatesTo>

    <wsa:MessageID>uuid:3b3cc879-2e4c-1e4c-8015-010001565000</wsa:MessageID>

  </s:Header>

  <s:Body>

    <s:Fault>

      <s:Code>

              <s:Value>s:Sender</s:Value>

        <s:Subcode>

          <s:Value>wsa:DestinationUnreachable</s:Value>

        </s:Subcode>

      </s:Code>

      <s:Reason>

        <s:Text xml:lang="en">No route can be determined to reach the destination role \

defined by the WS-Addressing To.</s:Text>

      </s:Reason>

      <s:Detail>

        <wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/Inval\

idResourceURI</wsman:FaultDetail>

      </s:Detail>

    </s:Fault>

  </s:Body>

</s:Envelope>

Connection failed. response code = 400


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|

Re: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

Nashif, Anas

The C++ API does not handle serialization yet, so you have to do it on your own using the serialization functions. For examples on how to do this, check serialize.c in the examples directory.

 

Anas

 


From: Wen Chen [mailto:[hidden email]]
Sent: Monday, April 23, 2007 6:27 PM
To: Nashif, Anas; [hidden email]
Subject: RE: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

Thanks Anas,

 

The C API works.

 

I’d like follow this up by asking for any samples that make use of the WsmanClientNamespace::Create(…) API.  This call takes the whole object as a string.  It’ll be helpful to learn how to generate this string for an instance of my AcaCommand class.

class Aca_Command{  [Key] string id;   string data;   …}

 

Regards,

 

Wen

 

 


From: Nashif, Anas [mailto:[hidden email]]
Sent: Monday, April 23, 2007 12:38 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

It seems the example was not up to date, I updated it with the namespaces, see

 

http://openwsman.svn.sourceforge.net/viewvc/openwsman/wsmancli/branches/wsmancli-1.0.0/examples/create_resource.c?revision=1285&view=markup

 

for the latest revision and try again please.

 

Anas

 


From: Wen Chen [mailto:[hidden email]]
Sent: Monday, April 23, 2007 3:25 PM
To: Nashif, Anas; [hidden email]
Subject: Encounter "missingValues"-WSMAN_DETAIL_MISSING_VALUES when creating Instance

 

Hi,

 

Openwsman-1.0.1

Wsmancli-1.0.1

 

When following the example in wsmancli/examples/create_resource.c to create instances, I have encountered a problem – missingValues=WSMAN_DETAIL_MISSING_VALUES.  For instance, I have a CIM Class that I want to instantiate:

namespace=root/cimv2 class=Aca_Command

class Aca_Command

{

  [Key] string id;

   string data;

   …

}

 

My client code looks like this:

struct __ACA_COMMAND {

  XML_TYPE_STR id;

  XML_TYPE_STR data;

};

typedef struct __ACA_COMMAND ACA_Command;

SER_START_ITEMS(ACA_Command)

SER_STR("id", 1),

SER_STR("data", 1),

SER_END_ITEMS(ACA_Command);

actionOptions *options;

options = initialize_action_options();

options->max_envelope_size = 51200;

    options->timeout = 60000;

    options->cim_ns="root/cimv2";

 

    ACA_Command *d = u_malloc(sizeof(ACA_Command));

    d->id = u_strdup("some command id");

    d->data = u_strdup("some command");

 

    doc = ws_transfer_create_serialized(cl, COMMAND_URI, options,  d, ACA_Command_TypeInfo);

 

Notice, I am trying to pass in the CIM namespace from options->cim_ns.  I am setting the namespace here because I don’t see anywhere else I can pass this in.

 

Now, the problem is, wsmand thinks WSMAN_DETAIL_MISSING_VALUES.  The place wsmand detects this problem is in wsman-xml.c:ws_xml_is_node_qname(…).  Or more specifically, ws_xml_is_node_qname(…) gets NULL from its call to ws_xml_get_node_name_ns(..).  And, when inspecting the content of the XML node, we see that node->ns is NULL.

 

(gdb) p (xmlNode)*node

$5 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x8062a3d "id", children = 0x8063a30,

  last = 0x8063a30, parent = 0x80639b0, next = 0x8063a88, prev = 0x0, doc = 0x8062cc8,

  ns = 0x0, content = 0x0, properties = 0x0, nsDef = 0x0, psvi = 0x0, line = 2, extra = 0}

 

(gdb) backtrace

#0  ws_xml_is_node_qname (node=0x80639f0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    name=0x8075768 "id") at wsman-xml.c:892

#1  0xb7d966a8 in ws_xml_get_child (parent=0x80639b0, index=0,

    nsUri=0x80750f8 "http://schema.teneros.com/wbem/wscim/1/cim-schema/2/Aca_Command",

    localName=0x8075768 "id") at wsman-xml.c:866

#2  0xb7ab08f8 in cim_create_instance (client=0x8062d60, cntx=0x8060788, in_body=0x8063970,

    body=0x8075350, status=0xb725bd00) at sfcc-interface.c:1383

#3  0xb7eef3b9 in CimResource_Create_EP (op=0x80605d8, appData=0xb7ef21c8)

at cim_data_stubs.c:549

 

Please advice if my client code is missing something, or there is a bug in wsmand.  Please advice a work around.

 

Thanks,

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Friday, April 20, 2007 5:48 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Wen,

 

The resource URI is not related to the CIM namespace, see the mapping specification (section 5.1):

 

CIM namespaces are not reflected in the ResourceURI structure, which is independent of where the class resides or is implemented.

 

 


From: Wen Chen [mailto:[hidden email]]
Sent: Saturday, April 21, 2007 8:43 AM
To: [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

Got it.  The custom namespace needs to be explicitly spelled out in openwsman.conf.  For instance,

 

vendor_namespaces = OpenWBEM=http://schema.openwbem.org/wbem/wscim/1/cim-schema/2,Linux=http://sblim.sf.net/wbem/wscim/1/cim-schema/2,OMC=http://schema.omc-project.org/wbem/wscim/1/cim-schema/2,Aca=http://schema.teneros.com/wbem/wscim/1/cim-schema/2

 

What is not apparent is that even though my Aca_XXX and CIM_XXX classes are under the same CIM root/cimv2 namespace, openwsman requires them split up into two separate namespaces just because of the naming convention.

 

Wen


From: Nashif, Anas [mailto:[hidden email]]
Sent: Wednesday, April 18, 2007 10:39 PM
To: Wen Chen; [hidden email]
Cc: Nashif, Anas
Subject: RE: [Openwsman-devel] Enum Problem new CIM Classes

 

You will need to configure openwsman to recognize your CIM classes in the openwsman configuration file (openwsman.conf) and add a custom namespace to address resource URIs.

I sent an email about this some time ago (see openwsman-devel archive).

 

Anas

 


From: [hidden email] [mailto:[hidden email]] On Behalf Of Wen Chen
Sent: Wednesday, April 18, 2007 10:37 AM
To: [hidden email]
Subject: [Openwsman-devel] Enum Problem new CIM Classes

 

Hi,

 

I have an Openwsman-1.0.1.  The CIMOM is openpegasus-2.6. 

 

I can enumerate successfully with standard root/cimv2 classes, such as CIM_OperationSystem and CIM_ComputerSystem.  But, when it comes to the CIM classes I have defined (also in root/cimv2), I consistently run into “DestinationUnreachable” error.  And, by tail –f the CIMOM’s log file, I can tell that the enumerate requests did not get to the CIMOM for my classes.

 

Here is an example request, where Aca_Command is my root/cimv2 class.  I am wondering if I need to load my mof into Openwsman.  But, I have no information on this subject.  Please advice.

 

*Request:*

CLASS=Aca_Command

wsman enumerate  http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/${CLASS} --port 8889 --username testuser1 -p testuser1 -h localhost --namespace root/cimv2

 

*Response:*

<?xml version="1.0" encoding="UTF-8"?>

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas\

.xmlsoap.org/ws/2004/08/addressing" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/w\

sman.xsd">

  <s:Header>

    <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>

    <wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action>

    <wsa:RelatesTo>uuid:3b3c8e86-2e4c-1e4c-8002-010001565000</wsa:RelatesTo>

    <wsa:MessageID>uuid:3b3cc879-2e4c-1e4c-8015-010001565000</wsa:MessageID>

  </s:Header>

  <s:Body>

    <s:Fault>

      <s:Code>

              <s:Value>s:Sender</s:Value>

        <s:Subcode>

          <s:Value>wsa:DestinationUnreachable</s:Value>

        </s:Subcode>

      </s:Code>

      <s:Reason>

        <s:Text xml:lang="en">No route can be determined to reach the destination role \

defined by the WS-Addressing To.</s:Text>

      </s:Reason>

      <s:Detail>

        <wsman:FaultDetail>http://schemas.dmtf.org/wbem/wsman/1/wsman/faultDetail/Inval\

idResourceURI</wsman:FaultDetail>

      </s:Detail>

    </s:Fault>

  </s:Body>

</s:Envelope>

Connection failed. response code = 400


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel