(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.74 and 1.81

version 1.74, 2002/09/13 21:40:42 version 1.81, 2002/11/14 16:50:33
Line 338 
Line 338 
  
     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);
 } }
  
Line 397 
Line 402 
     if (!entry.getAttributeValue("CLASSORIGIN", name))     if (!entry.getAttributeValue("CLASSORIGIN", name))
         return CIMName();         return CIMName();
  
       // KS 200209 This may be temp but we are adding test for form
       // CLASSNAME = "" for Wbemservices interoperability.  Returns same
       // as if attribute did not exist.
       if (name.size() == 0)
           return CIMName();
   
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
         char buffer[MESSAGE_SIZE];         char buffer[MESSAGE_SIZE];
Line 428 
Line 439 
  
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
   #ifdef PEGASUS_SNIA_INTEROP_TEST
       name = "PEGASUS_SUBSTITUED_THIS_FOR_BAD_NAME";
       return name;
   #endif
         char buffer[MESSAGE_SIZE];         char buffer[MESSAGE_SIZE];
         sprintf(buffer,         sprintf(buffer,
             "Illegal value for %s.REFERENCECLASS attribute", elementName);             "Illegal value for %s.REFERENCECLASS attribute", elementName);
Line 971 
Line 986 
  
             if (!stringToUnsignedInteger(valueString, x))             if (!stringToUnsignedInteger(valueString, x))
             {             {
               char message[128];
               sprintf(message, "Illegal unsigned integer value - %s", valueString);
                 throw XmlSemanticError(                 throw XmlSemanticError(
                     lineNumber, "Invalid unsigned integer value");                      lineNumber, message);
             }             }
  
             switch (type)             switch (type)
Line 1062 
Line 1079 
  
             try             try
             {             {
               // KS 20021002 - Exception if no datatime value. Test for
               // zero length and leave the NULL value in the variable
               // Bugzilla 137  Adds the following if line.
               // Expect this to become permanent but test only for now
   #ifdef PEGASUS_SNIA_INTEROP_TEST
               if (strlen(valueString) != 0)
   #endif
                 tmp.set(valueString);                 tmp.set(valueString);
             }             }
             catch (InvalidDateTimeFormatException&)             catch (InvalidDateTimeFormatException&)
Line 1132 
Line 1156 
  
         expectEndTag(parser, "VALUE");         expectEndTag(parser, "VALUE");
     }     }
   #ifdef PEGASUS_SNIA_INTEROP_TEST
       // KS 20021004 - tries to put value in even if empty.
       // Think this is general problem with empty value
       // Need to check meaning of (#PCDATA) - Does it allow empty.
       // Bugzilla tbd
       if (!empty)
   #endif
     value = stringToValue(parser.getLine(), valueString,type);     value = stringToValue(parser.getLine(), valueString,type);
  
     return true;     return true;
Line 1780 
Line 1810 
  
     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)
     {     {
Line 1788 
Line 1834 
     }     }
  
     host = entry.text;     host = entry.text;
   #endif
     expectEndTag(parser, "HOST");     expectEndTag(parser, "HOST");
     return true;     return true;
 } }
Line 1921 
Line 1967 
         else         else
             return false;             return false;
     }     }
   
     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;     Boolean empty = entry.type == XmlEntry::EMPTY_TAG;
  
     className = getCimNameAttribute(     className = getCimNameAttribute(
         parser.getLine(), entry, "CLASSNAME", true);          parser.getLine(), entry, "CLASSNAME", false);
  
     if (!empty)     if (!empty)
         expectEndTag(parser, "CLASSNAME");         expectEndTag(parser, "CLASSNAME");


Legend:
Removed from v.1.74  
changed lines
  Added in v.1.81

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2