(file) Return to XmlReader.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.128 and 1.129

version 1.128, 2007/10/17 20:38:06 version 1.129, 2008/01/30 18:56:21
Line 490 
Line 490 
 // //
 // getEmbeddedObjectAttribute() // getEmbeddedObjectAttribute()
 // //
 //     <!ENTITY % EmbeddedObject "EMBEDDEDOBJECT (object | instance) #IMPLIED">  //     <!ENTITY % EmbeddedObject "EmbeddedObject (object | instance) #IMPLIED">
 // //
 //------------------------------------------------------------------------------ //------------------------------------------------------------------------------
  
Line 501 
Line 501 
 { {
     String embeddedObject;     String embeddedObject;
  
     if (!entry.getAttributeValue("EMBEDDEDOBJECT", embeddedObject))      // Check for both upper case and mixed case "EmbeddedObject"
       // because of an error in an earlier pegasus version  where we
       // used upper case in the generation of the attribute name
       // whereas the DMTF spec calls for mixed case.
       if (!entry.getAttributeValue("EmbeddedObject", embeddedObject) &&
           !entry.getAttributeValue("EMBEDDEDOBJECT", embeddedObject))
         return String();         return String();
  
     // The embeddedObject attribute, if present, must have the string     // The embeddedObject attribute, if present, must have the string
Line 510 
Line 515 
           String::equal(embeddedObject, "instance")))           String::equal(embeddedObject, "instance")))
     {     {
         char buffer[MESSAGE_SIZE];         char buffer[MESSAGE_SIZE];
         sprintf(buffer, "%s.EMBEDDEDOBJECT", elementName);          sprintf(buffer, "%s.EmbeddedObject", elementName);
  
         MessageLoaderParms mlParms(         MessageLoaderParms mlParms(
             "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",             "Common.XmlReader.ILLEGAL_VALUE_FOR_ATTRIBUTE",
Line 1745 
Line 1750 
     Boolean propagated = getCimBooleanAttribute(     Boolean propagated = getCimBooleanAttribute(
         parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);         parser.getLine(), entry, "PROPERTY", "PROPAGATED", false, false);
  
     // Get PROPERTY.EMBEDDEDOBJECT attribute:      // Get PROPERTY.EmbeddedObject attribute:
  
     String embeddedObject = getEmbeddedObjectAttribute(     String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "PROPERTY");         parser.getLine(), entry, "PROPERTY");
Line 1783 
Line 1788 
             embeddedInstanceQualifierValue);             embeddedInstanceQualifierValue);
     }     }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     // If the EMBEDDEDOBJECT attribute is present with value "object"      // If the EmbeddedObject attribute is present with value "object"
     // or the EmbeddedObject qualifier exists on this property with value "true"     // or the EmbeddedObject qualifier exists on this property with value "true"
     // then      // then convert the EmbeddedObject-encoded string into a CIMObject
     //     Convert the EmbeddedObject-encoded string into a CIMObject  
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||     Boolean isEmbeddedObject = String::equal(embeddedObject, "object") ||
         embeddedObjectQualifierValue;         embeddedObjectQualifierValue;
Line 1794 
Line 1798 
         embeddedInstanceQualifierValue.size() > 0;         embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)     if (isEmbeddedObject || isEmbeddedInstance)
     {     {
         // The EMBEDDEDOBJECT attribute is only valid on Properties of type          // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
         if (type == CIMTYPE_STRING)         if (type == CIMTYPE_STRING)
         {         {
Line 1824 
Line 1828 
         {         {
             MessageLoaderParms mlParms(             MessageLoaderParms mlParms(
                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                 "The EMBEDDEDOBJECT attribute is only valid on string types.");                  "The EmbeddedObject attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);             throw XmlValidationError(parser.getLine(), mlParms);
         }         }
     }     }
 #else #else
     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {     {
         // The EMBEDDEDOBJECT attribute is only valid on Properties of type          // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
         if (type == CIMTYPE_STRING)         if (type == CIMTYPE_STRING)
         {         {
Line 1858 
Line 1862 
         {         {
             MessageLoaderParms mlParms(             MessageLoaderParms mlParms(
                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                 "The EMBEDDEDOBJECT attribute is only valid on string types.");                  "The EmbeddedObject attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);             throw XmlValidationError(parser.getLine(), mlParms);
         }         }
     }     }
Line 1973 
Line 1977 
         false,         false,
         false);         false);
  
     // Get PROPERTY.EMBEDDEDOBJECT attribute:      // Get PROPERTY.EmbeddedObject attribute:
  
     String embeddedObject = getEmbeddedObjectAttribute(     String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "PROPERTY.ARRAY");         parser.getLine(), entry, "PROPERTY.ARRAY");
Line 2005 
Line 2009 
             embeddedInstanceQualifierValue);             embeddedInstanceQualifierValue);
     }     }
 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
     // If the EMBEDDEDOBJECT attribute is present with value "object"      // If the EmbeddedObject attribute is present with value "object"
     // or the EmbeddedObject qualifier exists on this property with value "true"     // or the EmbeddedObject qualifier exists on this property with value "true"
     // then     // then
     //     Convert the EmbeddedObject-encoded string into a CIMObject     //     Convert the EmbeddedObject-encoded string into a CIMObject
Line 2016 
Line 2020 
         embeddedInstanceQualifierValue.size() > 0;         embeddedInstanceQualifierValue.size() > 0;
     if (isEmbeddedObject || isEmbeddedInstance)     if (isEmbeddedObject || isEmbeddedInstance)
     {     {
         // The EMBEDDEDOBJECT attribute is only valid on Properties of type          // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
         if (type == CIMTYPE_STRING)         if (type == CIMTYPE_STRING)
         {         {
Line 2046 
Line 2050 
         {         {
             MessageLoaderParms mlParms(             MessageLoaderParms mlParms(
                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                 "The EMBEDDEDOBJECT attribute is only valid on string types.");                  "The EmbeddedObject attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);             throw XmlValidationError(parser.getLine(), mlParms);
         }         }
     }     }
 #else #else
     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)     if (String::equal(embeddedObject, "object") || embeddedObjectQualifierValue)
     {     {
         // The EMBEDDEDOBJECT attribute is only valid on Properties of type          // The EmbeddedObject attribute is only valid on Properties of type
         // string         // string
         if (type == CIMTYPE_STRING)         if (type == CIMTYPE_STRING)
         {         {
Line 2080 
Line 2084 
         {         {
             MessageLoaderParms mlParms(             MessageLoaderParms mlParms(
                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                 "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                 "The EMBEDDEDOBJECT attribute is only valid on string types.");                  "The EmbeddedObject attribute is only valid on string types.");
             throw XmlValidationError(parser.getLine(), mlParms);             throw XmlValidationError(parser.getLine(), mlParms);
         }         }
     }     }
Line 4185 
Line 4189 
         throw XmlValidationError(parser.getLine(), mlParms);         throw XmlValidationError(parser.getLine(), mlParms);
     }     }
  
     // Get PROPERTY.EMBEDDEDOBJECT      // Get PROPERTY.EmbeddedObject
  
     String embeddedObject = getEmbeddedObjectAttribute(     String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "PARAMVALUE");         parser.getLine(), entry, "PARAMVALUE");
Line 4236 
Line 4240 
                 effectiveType = type;                 effectiveType = type;
             }             }
  
             // If the EMBEDDEDOBJECT attribute is present with value "object"              // If the EmbeddedObject attribute is present with value "object"
             // then             // then
             //     Convert the EmbeddedObject-encoded string into a CIMObject             //     Convert the EmbeddedObject-encoded string into a CIMObject
 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
Line 4245 
Line 4249 
                 String::equal(embeddedObject, "instance");                 String::equal(embeddedObject, "instance");
             if (isEmbeddedObject || isEmbeddedInstance)             if (isEmbeddedObject || isEmbeddedInstance)
             {             {
                 // The EMBEDDEDOBJECT attribute is only valid on Parameters                  // The EmbeddedObject attribute is only valid on Parameters
                 // of type string                 // of type string
                 // The type must have been specified.                 // The type must have been specified.
                 if (gotType && (type == CIMTYPE_STRING))                 if (gotType && (type == CIMTYPE_STRING))
Line 4261 
Line 4265 
                 {                 {
                     MessageLoaderParms mlParms(                     MessageLoaderParms mlParms(
                         "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                         "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                         "The EMBEDDEDOBJECT attribute is only valid on "                          "The EmbeddedObject attribute is only valid on "
                             "string types.");                             "string types.");
                     throw XmlValidationError(parser.getLine(), mlParms);                     throw XmlValidationError(parser.getLine(), mlParms);
                 }                 }
Line 4269 
Line 4273 
 #else #else
             if (String::equal(embeddedObject, "object"))             if (String::equal(embeddedObject, "object"))
             {             {
                 // The EMBEDDEDOBJECT attribute is only valid on Parameters                  // The EmbeddedObject attribute is only valid on Parameters
                 // of type string                 // of type string
                 // The type must have been specified.                 // The type must have been specified.
                 if (gotType && (type == CIMTYPE_STRING))                 if (gotType && (type == CIMTYPE_STRING))
Line 4281 
Line 4285 
                 {                 {
                     MessageLoaderParms mlParms(                     MessageLoaderParms mlParms(
                         "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                         "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                         "The EMBEDDEDOBJECT attribute is only valid on "                          "The EmbeddedObject attribute is only valid on "
                             "string types.");                             "string types.");
                     throw XmlValidationError(parser.getLine(), mlParms);                     throw XmlValidationError(parser.getLine(), mlParms);
                 }                 }
Line 4326 
Line 4330 
     if (!testStartTag(parser, entry, "RETURNVALUE"))     if (!testStartTag(parser, entry, "RETURNVALUE"))
         return false;         return false;
  
     // Get PROPERTY.EMBEDDEDOBJECT      // Get PROPERTY.EmbeddedObject
  
     String embeddedObject = getEmbeddedObjectAttribute(     String embeddedObject = getEmbeddedObjectAttribute(
         parser.getLine(), entry, "RETURNVALUE");         parser.getLine(), entry, "RETURNVALUE");
Line 4381 
Line 4385 
             {             {
                 MessageLoaderParms mlParms(                 MessageLoaderParms mlParms(
                     "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                     "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                     "The EMBEDDEDOBJECT attribute is only valid on string "                      "The EmbeddedObject attribute is only valid on string "
                         "types.");                         "types.");
                 throw XmlValidationError(parser.getLine(), mlParms);                 throw XmlValidationError(parser.getLine(), mlParms);
             }             }
Line 4397 
Line 4401 
             {             {
                 MessageLoaderParms mlParms(                 MessageLoaderParms mlParms(
                     "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",                     "Common.XmlReader.INVALID_EMBEDDEDOBJECT_TYPE",
                     "The EMBEDDEDOBJECT attribute is only valid on string "                      "The EmbeddedObject attribute is only valid on string "
                         "types.");                         "types.");
                 throw XmlValidationError(parser.getLine(), mlParms);                 throw XmlValidationError(parser.getLine(), mlParms);
             }             }


Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2