version 1.77, 2002/10/02 22:40:34
|
version 1.78, 2002/10/03 19:27:31
|
|
|
| |
if (!CIMName::legal(name)) | if (!CIMName::legal(name)) |
{ | { |
|
#ifdef PEGASUS_SNIA_INTEROP_TEST |
|
// In testing, replace illegal CIMName with this value to avoid the |
|
// exception and let xml parsing continue. THIS IS TEMP. |
|
name = "BADNAMESUBSTITUTEDBYPEGASUSCLIENT"; |
|
#else |
char buffer[MESSAGE_SIZE]; | char buffer[MESSAGE_SIZE]; |
sprintf(buffer, "Illegal value for %s.NAME attribute", elementName); | sprintf(buffer, "Illegal value for %s.NAME attribute", elementName); |
throw XmlSemanticError(lineNumber, buffer); | throw XmlSemanticError(lineNumber, buffer); |
|
#endif |
} | } |
|
|
return CIMName (name); | return CIMName (name); |
} | } |
| |
|
|
// KS 20021002 - Exception if no datatime value. Test for | // KS 20021002 - Exception if no datatime value. Test for |
// zero length and leave the NULL value in the variable | // zero length and leave the NULL value in the variable |
// Bugzilla 137 Adds the following if line. | // Bugzilla 137 Adds the following if line. |
|
// Expect this to become permanent but test only for now |
#ifdef PEGASUS_SNIA_INTEROP_TEST | #ifdef PEGASUS_SNIA_INTEROP_TEST |
if (strlen(valueString) != 0) | if (strlen(valueString) != 0) |
#endif | #endif |
|
|
| |
if (!testStartTag(parser, entry, "HOST")) | if (!testStartTag(parser, entry, "HOST")) |
return false; | return false; |
|
#ifdef PEGASUS_SNIA_INTEROP_TEST |
|
// Temp code to allow empty HOST field. |
|
// SNIA CIMOMs return empty field particularly on enumerateinstance. |
|
// Simply substitute a string for the empty. |
|
if (!parser.next(entry)) |
|
throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine()); |
|
|
|
if (entry.type == XmlEntry::CONTENT) |
|
host = entry.text; |
|
else |
|
{ |
|
parser.putBack(entry); |
|
host = "HOSTNAMEINSERTEDBYPEGASUSCLIENT"; |
|
} |
|
|
|
#else |
| |
if (!parser.next(entry) || entry.type != XmlEntry::CONTENT) | if (!parser.next(entry) || entry.type != XmlEntry::CONTENT) |
{ | { |
|
|
} | } |
| |
host = entry.text; | host = entry.text; |
|
#endif |
expectEndTag(parser, "HOST"); | expectEndTag(parser, "HOST"); |
return true; | return true; |
} | } |
|
|
else | else |
return false; | return false; |
} | } |
|
|
Boolean empty = entry.type == XmlEntry::EMPTY_TAG; | Boolean empty = entry.type == XmlEntry::EMPTY_TAG; |
| |
className = getCimNameAttribute( | className = getCimNameAttribute( |