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

Diff for /pegasus/src/Pegasus/Server/CIMOperationRequestDecoder.cpp between version 1.127 and 1.127.2.20

version 1.127, 2010/06/06 17:04:18 version 1.127.2.20, 2014/05/05 20:59:42
Line 45 
Line 45 
 #include <Pegasus/Common/CommonUTF.h> #include <Pegasus/Common/CommonUTF.h>
 #include <Pegasus/Common/MessageLoader.h> #include <Pegasus/Common/MessageLoader.h>
 #include <Pegasus/Common/BinaryCodec.h> #include <Pegasus/Common/BinaryCodec.h>
   #include <Pegasus/Common/OperationContextInternal.h>
   #include <Pegasus/General/CIMError.h>
   
   #ifdef PEGASUS_PAM_SESSION_SECURITY
   #include <Pegasus/Security/Authentication/PAMSessionBasicAuthenticator.h>
   #include <Pegasus/Security/Authentication/AuthenticationStatus.h>
   #endif
   
  
 PEGASUS_USING_STD; PEGASUS_USING_STD;
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   /******************************************************************************
   **
   **             Local Functions
   **
   ******************************************************************************/
   
   
   /******************************************************************************
   **
   **            Common Exception Messages. Reduce the
   **            number of throws to reduce code size.
   **
   ******************************************************************************/
   
   //
   // throw CIM_ERR_NOT_SUPPORTED with optional added text
   void _throwCIMExceptionCIMErrNotSupported(const String& param = String::EMPTY)
   {
       throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, param);
   }
   
   // throw internationalized PEGASUS_CIM_EXCEPTION_L
   void _throwCIMExceptionCIMErrNotSupported(const MessageLoaderParms& mlp)
   {
       throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED, mlp);
   }
   
   // Throw CIM_ERR_INVALID_PARAMETER with optional parameter name(s)
   void _throwCIMExceptionInvalidParameter(const String& param = String::EMPTY)
   {
       throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, param);
   }
   
   // Throw CIM_ERR_INVALID_PARAMETER with optional parameter name(s)
   void _throwCIMExceptionInvalidParameter(const MessageLoaderParms& mlp)
   {
       throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_INVALID_PARAMETER, mlp);
   }
   
   // Common call for all cases where duplicate Input parameter Values recieved
   // in a single operation. Throw InvalidParameter exception with optional
   // additional data.
   void _throwCIMExceptionDuplicateParameter(const String& name = String::EMPTY)
   {
       _throwCIMExceptionInvalidParameter(MessageLoaderParms(
           "Server.CIMOperationRequestDecoder."
                   "DUPLICATE_PARAMETER",
           "Duplicated request input parameter."));
   }
   
   // Common call for cases where Invalid IParameterValue names recived
   void _throwCIMExceptionInvalidIParamName(const String& name)
   {
       _throwCIMExceptionCIMErrNotSupported(MessageLoaderParms(
           "Server.CIMOperationRequestDecoder."
               "INVALID_PARAMETER",
           "Unrecognized or invalid request input parameter \"$0\"", name));
   }
   
   // Throw CIM_ERR_ENUMERATION_CONTEXT_REQUIRED
   void _throwCIMExceptionEnumerationContextRequired()
   {
       _throwCIMExceptionInvalidParameter(MessageLoaderParms(
           "Server.CIMOperationRequestDecoder."
                   "ENUMERATION_CONTEXT_REQUIRED",
           "The EnumerationContext input parameter is required."));
   }
   
   // test if Required parameters exist (i.e. the got variable is
   // true. Generates exception if exist == false
   
   void _throwCIMExceptionRequiredDoesNotExist(const String& name)
   {
       _throwCIMExceptionInvalidParameter(MessageLoaderParms(
       "Server.CIMOperationRequestDecoder."
           "REQUIRED_PARAMETER_MISSING",
       "Required parameter \"$0\" missing from request.", name));
   }
   
   // KS_TODO - Original function. Issues message with no name attached.
   // We want to get rid of this one completely
   void _testRequiredParametersExist(Boolean exist)
   {
       if (!exist)
       {
           _throwCIMExceptionInvalidParameter();
       }
   }
   
   void _testRequiredParametersExist(const char* name, Boolean exist)
   {
       if (!exist)
       {
           _throwCIMExceptionRequiredDoesNotExist(String(name));
       }
   }
   
   void _testRequiredParametersExist(const String& name, Boolean exist)
   {
       if (!exist)
       {
           _throwCIMExceptionRequiredDoesNotExist(name);
       }
   }
   /******************************************************************************
   **
   **            CIMOperationRequestDecoder Class
   **
   ******************************************************************************/
   
   #ifdef PEGASUS_PAM_SESSION_SECURITY
   void CIMOperationRequestDecoder::_updateExpiredPassword(
       Uint32 queueId,
       HttpMethod httpMethod,
       const String& messageId,
       Boolean closeConnect,
       const ContentLanguageList& httpContentLanguages,
       CIMMessage * request,
       const String& userName,
       const String& oldPass,
       const String& ipAddress)
   {
       static CIMName meth = CIMName("UpdateExpiredPassword");
       static CIMName clName = CIMName("PG_Account");
   
   
       // this has to be an invokeMethod and
       if (CIM_INVOKE_METHOD_REQUEST_MESSAGE != request->getType())
       {
           sendHttpError(
               queueId,
               HTTP_STATUS_BADREQUEST,
               "invalid header",
               "Header \'Pragma: UpdateExpiredPassword\' not valid for this "
                   "CIMMethod.",
               closeConnect);
   
           return;
       }
   
       CIMInvokeMethodRequestMessage* msg =
           dynamic_cast<CIMInvokeMethodRequestMessage*>(request);
   
       // class PG_Account
       // method UpdateExpiredPassword
       // InterOp namespace
       if ((!clName.equal(msg->className)) ||
           (!(meth.equal(msg->methodName))) ||
           (!msg->nameSpace.equal(PEGASUS_NAMESPACENAME_INTEROP.getString())))
       {
           // not of interest for us, chicken out
           sendHttpError(
               queueId,
               HTTP_STATUS_BADREQUEST,
               "invalid header",
               "Header \'Pragma: UpdateExpiredPassword\' not valid for this "
                   "class, method or namespace.",
               closeConnect);
           return;
       }
   
       String newPass;
       Boolean found = false;
   
       try
       {
           // Get new password from request - String-type Parameter UserPassword
           Array<CIMParamValue> inParm = msg->inParameters;
           for (Uint32 i=0; i < inParm.size(); i++)
           {
               CIMParamValue x = inParm[i];
               if (String::equalNoCase(x.getParameterName(),"UserPassword"))
               {
                   CIMValue passValue = x.getValue();
                   passValue.get(newPass);
                   found = true;
                   break;
               }
           }
       } catch(Exception &e)
       {
           // already know it is an invokeMethod, see checks above
           sendMethodError(
               queueId,
               httpMethod,
               messageId,
               meth.getString(),
               PEGASUS_CIM_EXCEPTION(
                   CIM_ERR_INVALID_PARAMETER, e.getMessage()),
               closeConnect);
           return;
       }
       if (!found)
       {
           sendMethodError(
               queueId,
               httpMethod,
               messageId,
               meth.getString(),
               PEGASUS_CIM_EXCEPTION(
                   CIM_ERR_INVALID_PARAMETER, "Missing Parameter UserPassword"),
               closeConnect);
           return;
       }
       // Call password update function from PAMSession.h
       AuthenticationStatus authStat =
           PAMSessionBasicAuthenticator::updateExpiredPassword(
               userName,
               oldPass,
               newPass,
               ipAddress);
   
       if (authStat.isSuccess())
       {
           // Send success message
           Buffer message;
           Buffer emptyBody;
   
           XmlWriter::appendReturnValueElement(
               emptyBody,
               CIMValue((Uint8)authStat.getMethodReturnCode()));
   
           message = XmlWriter::formatSimpleMethodRspMessage(
               meth,
               messageId,
               httpMethod,
               httpContentLanguages,
               emptyBody,
               0,
               true,
               true);
   
           sendResponse(queueId, message,closeConnect);
       }
       else
       {
           sendHttpError(
               queueId,
               authStat.getHttpStatus(),
               String::EMPTY,
               authStat.getErrorDetail(),
               closeConnect);
       }
   }
   #endif
   
 CIMOperationRequestDecoder::CIMOperationRequestDecoder( CIMOperationRequestDecoder::CIMOperationRequestDecoder(
     MessageQueue* outputQueue,     MessageQueue* outputQueue,
     Uint32 returnQueueId)     Uint32 returnQueueId)
Line 115 
Line 369 
     sendResponse(queueId, message,closeConnect);     sendResponse(queueId, message,closeConnect);
 } }
  
   void CIMOperationRequestDecoder::sendUserAccountExpired(
       Uint32 queueId,
       HttpMethod httpMethod,
       const String& messageId,
       const String& methodName,
       Boolean closeConnect,
       Boolean isIMethod)
   {
       Buffer message;
   
       CIMError errorInst;
       errorInst.setErrorType(CIMError::ERROR_TYPE_OTHER);
       errorInst.setOtherErrorType("Expired Password");
       errorInst.setProbableCause(CIMError::PROBABLE_CAUSE_AUTHENTICATION_FAILURE);
   
       CIMException myExc(
           CIM_ERR_ACCESS_DENIED,
           "User Account Expired",
           errorInst.getInstance());
   
       if (isIMethod)
       {
           message = XmlWriter::formatSimpleIMethodErrorRspMessage(
               methodName,
               messageId,
               httpMethod,
               myExc);
       }
       else
       {
           message = XmlWriter::formatSimpleMethodErrorRspMessage(
               methodName,
               messageId,
               httpMethod,
               myExc);
       }
   
       sendResponse(queueId, message,closeConnect);
   }
   
 void CIMOperationRequestDecoder::sendHttpError( void CIMOperationRequestDecoder::sendHttpError(
     Uint32 queueId,     Uint32 queueId,
     const String& status,     const String& status,
Line 144 
Line 438 
  
         default:         default:
             // Unexpected message type             // Unexpected message type
             PEGASUS_ASSERT(0);              PEGASUS_UNREACHABLE(PEGASUS_ASSERT(0);)
             break;             break;
     }     }
  
Line 172 
Line 466 
 // //
 //     M-POST /cimom HTTP/1.1 //     M-POST /cimom HTTP/1.1
 //     HOST: www.erewhon.com //     HOST: www.erewhon.com
 //     Content-Type: application/xml; charset="utf-8"  //     Content-Type: application/xml; charset=utf-8
 //     Content-Length: xxxx //     Content-Length: xxxx
 //     Man: http://www.dmtf.org/cim/operation ; ns=73 //     Man: http://www.dmtf.org/cim/operation ; ns=73
 //     73-CIMOperation: MethodCall //     73-CIMOperation: MethodCall
Line 195 
Line 489 
  
     Uint32 queueId = httpMessage->queueId;     Uint32 queueId = httpMessage->queueId;
  
     // Save userName and authType:      // Save userName, userRole, userPass and authType:
  
     String userName;     String userName;
       String userRole;
       String userPass;
       Boolean isExpiredPassword = false;
       Boolean updateExpiredPassword;
     String authType;     String authType;
     Boolean closeConnect = httpMessage->getCloseConnect();     Boolean closeConnect = httpMessage->getCloseConnect();
  
Line 210 
Line 508 
  
     userName = httpMessage->authInfo->getAuthenticatedUser();     userName = httpMessage->authInfo->getAuthenticatedUser();
     authType = httpMessage->authInfo->getAuthType();     authType = httpMessage->authInfo->getAuthType();
       userRole = httpMessage->authInfo->getUserRole();
       userPass = httpMessage->authInfo->getAuthenticatedPassword();
   
   #ifdef PEGASUS_PAM_SESSION_SECURITY
       isExpiredPassword = httpMessage->authInfo->isExpiredPassword();
   #endif
  
     // Parse the HTTP message:     // Parse the HTTP message:
  
Line 283 
Line 587 
     // Validate the "CIMOperation" header:     // Validate the "CIMOperation" header:
  
     const char* cimOperation;     const char* cimOperation;
     Boolean operationHeaderFound = HTTPMessage::lookupHeader(  
         headers, "CIMOperation", cimOperation, true);  
     // If the CIMOperation header was missing, the HTTPAuthenticatorDelegator     // If the CIMOperation header was missing, the HTTPAuthenticatorDelegator
     // would not have passed the message to us.     // would not have passed the message to us.
     PEGASUS_ASSERT(operationHeaderFound);      PEGASUS_FCT_EXECUTE_AND_ASSERT(
           true,
           HTTPMessage::lookupHeader(headers, "CIMOperation", cimOperation, true));
  
     if (System::strcasecmp(cimOperation, "MethodCall") != 0)     if (System::strcasecmp(cimOperation, "MethodCall") != 0)
     {     {
Line 344 
Line 649 
         cimProtocolVersion = "1.0";         cimProtocolVersion = "1.0";
     }     }
  
       // Validate if Pragma: UpdateExpiredPassword is set
       updateExpiredPassword = false;
   
       String pragmaValue;
       if(HTTPMessage::lookupHeader(headers,"Pragma",pragmaValue))
       {
           updateExpiredPassword =
               (PEG_NOT_FOUND != pragmaValue.find("UpdateExpiredPassword"));
       }
   
     String cimMethod;     String cimMethod;
     if (HTTPMessage::lookupHeader(headers, "CIMMethod", cimMethod, true))     if (HTTPMessage::lookupHeader(headers, "CIMMethod", cimMethod, true))
     {     {
Line 426 
Line 741 
         }         }
     }     }
  
     // Calculate the beginning of the content from the message size and  
     // the content length.  
   
     content = (char*) httpMessage->message.getData() +  
         httpMessage->message.size() - contentLength;  
   
     // Validate the "Content-Type" header:     // Validate the "Content-Type" header:
  
     const char* cimContentType;     const char* cimContentType;
Line 446 
Line 755 
         (((!String::equalNoCase(type, "application/xml") &&         (((!String::equalNoCase(type, "application/xml") &&
          !String::equalNoCase(type, "text/xml")) ||          !String::equalNoCase(type, "text/xml")) ||
         !String::equalNoCase(charset, "utf-8"))         !String::equalNoCase(charset, "utf-8"))
 #if defined(PEGASUS_ENABLE_PROTOCOL_BINARY)  
         && !(binaryRequest = String::equalNoCase(type,         && !(binaryRequest = String::equalNoCase(type,
             "application/x-openpegasus"))             "application/x-openpegasus"))
 #endif  
         ))         ))
     {     {
         MessageLoaderParms parms(         MessageLoaderParms parms(
Line 464 
Line 771 
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return;         return;
     }     }
       // Calculate the beginning of the content from the message size and
       // the content length.
       if (binaryRequest)
       {
           // binary the "Content" also contains a few padding '\0' to align
           // data structures to 8byte boundary
           // the padding '\0' are also part of the counted contentLength
           Uint32 headerEnd = httpMessage->message.size() - contentLength;
           Uint32 binContentStart = CIMBuffer::round(headerEnd);
   
           contentLength = contentLength - (binContentStart - headerEnd);
           content = (char*) httpMessage->message.getData() + binContentStart;
       }
       else
       {
           content = (char*) httpMessage->message.getData() +
               httpMessage->message.size() - contentLength;
       }
   
     // Validating content falls within UTF8     // Validating content falls within UTF8
     // (required to be complaint with section C12 of Unicode 4.0 spec,     // (required to be complaint with section C12 of Unicode 4.0 spec,
     // chapter 3.)     // chapter 3.)
     else if (!binaryRequest)      if (!binaryRequest)
     {     {
         Uint32 count = 0;         Uint32 count = 0;
         while(count<contentLength)         while(count<contentLength)
Line 505 
Line 831 
     {     {
         binaryResponse = false;         binaryResponse = false;
     }     }
       httpMessage->binaryResponse=binaryResponse;
  
     // If it is a method call, then dispatch it to be handled:     // If it is a method call, then dispatch it to be handled:
  
Line 518 
Line 845 
         cimObject,         cimObject,
         authType,         authType,
         userName,         userName,
           userRole,
           userPass,
           isExpiredPassword,
           updateExpiredPassword,
         httpMessage->ipAddress,         httpMessage->ipAddress,
         httpMessage->acceptLanguages,         httpMessage->acceptLanguages,
         httpMessage->contentLanguages,         httpMessage->contentLanguages,
Line 538 
Line 869 
     const String& cimObjectInHeader,     const String& cimObjectInHeader,
     const String& authType,     const String& authType,
     const String& userName,     const String& userName,
       const String& userRole,
       const String& userPass,
       Boolean isExpiredPassword,
       Boolean updateExpiredPassword,
     const String& ipAddress,     const String& ipAddress,
     const AcceptLanguageList& httpAcceptLanguages,     const AcceptLanguageList& httpAcceptLanguages,
     const ContentLanguageList& httpContentLanguages,     const ContentLanguageList& httpContentLanguages,
Line 575 
Line 910 
     //     //
  
     AutoPtr<CIMOperationRequestMessage> request;     AutoPtr<CIMOperationRequestMessage> request;
       String messageId;
       Boolean isIMethodCall = true;
  
     if (binaryRequest)     if (binaryRequest)
     {     {
         Buffer buf(content, contentLength);          CIMBuffer buf(content, contentLength);
           CIMBufferReleaser buf_(buf);
  
         request.reset(BinaryCodec::decodeRequest(buf, queueId, _returnQueueId));         request.reset(BinaryCodec::decodeRequest(buf, queueId, _returnQueueId));
  
Line 598 
Line 936 
     {     {
         XmlParser parser(content);         XmlParser parser(content);
         XmlEntry entry;         XmlEntry entry;
         String messageId;  
         const char* cimMethodName = "";         const char* cimMethodName = "";
  
         //         //
Line 731 
Line 1068 
  
         if (XmlReader::getIMethodCallStartTag(parser, cimMethodName))         if (XmlReader::getIMethodCallStartTag(parser, cimMethodName))
         {         {
               isIMethodCall = true;
             // The Specification for CIM Operations over HTTP reads:             // The Specification for CIM Operations over HTTP reads:
             //     3.3.6. CIMMethod             //     3.3.6. CIMMethod
             //             //
Line 968 
Line 1306 
                 else if (System::strcasecmp(cimMethodName, "ExecQuery") == 0)                 else if (System::strcasecmp(cimMethodName, "ExecQuery") == 0)
                     request.reset(decodeExecQueryRequest(                     request.reset(decodeExecQueryRequest(
                         queueId, parser, messageId, nameSpace));                         queueId, parser, messageId, nameSpace));
                   // EXP_PULL_BEGIN
                   else if (System::strcasecmp(
                                cimMethodName, "OpenEnumerateInstances") == 0)
                       request.reset(decodeOpenEnumerateInstancesRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenEnumerateInstancePaths") == 0)
                       request.reset(decodeOpenEnumerateInstancePathsRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenReferenceInstances") == 0)
                       request.reset(decodeOpenReferenceInstancesRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenReferenceInstancePaths") == 0)
                       request.reset(decodeOpenReferenceInstancePathsRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenAssociatorInstances") == 0)
                       request.reset(decodeOpenAssociatorInstancesRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenAssociatorInstancePaths") == 0)
                       request.reset(decodeOpenAssociatorInstancePathsRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "PullInstancesWithPath") == 0)
                       request.reset(decodePullInstancesWithPathRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "PullInstancePaths") == 0)
                       request.reset(decodePullInstancePathsRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "CloseEnumeration") == 0)
                       request.reset(decodeCloseEnumerationRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "EnumerationCount") == 0)
                       request.reset(decodeEnumerationCountRequest(
                           queueId, parser, messageId, nameSpace));
   
                   else if (System::strcasecmp(
                                cimMethodName, "OpenQueryInstances") == 0)
                       request.reset(decodeOpenQueryInstancesRequest(
                           queueId, parser, messageId, nameSpace));
                   // EXP_PULL_END
                 else                 else
                 {                 {
                     throw PEGASUS_CIM_EXCEPTION_L(CIM_ERR_NOT_SUPPORTED,                      _throwCIMExceptionCIMErrNotSupported(MessageLoaderParms(
                         MessageLoaderParms(  
                             "Server.CIMOperationRequestDecoder."                             "Server.CIMOperationRequestDecoder."
                                 "UNRECOGNIZED_INTRINSIC_METHOD",                                 "UNRECOGNIZED_INTRINSIC_METHOD",
                             "Unrecognized intrinsic method: $0",                             "Unrecognized intrinsic method: $0",
Line 1022 
Line 1415 
         else if (XmlReader::getMethodCallStartTag(parser, cimMethodName))         else if (XmlReader::getMethodCallStartTag(parser, cimMethodName))
         {         {
             CIMObjectPath reference;             CIMObjectPath reference;
               isIMethodCall = false;
  
             // The Specification for CIM Operations over HTTP reads:             // The Specification for CIM Operations over HTTP reads:
             //     3.3.6. CIMMethod             //     3.3.6. CIMMethod
Line 1323 
Line 1717 
         PEG_METHOD_EXIT();         PEG_METHOD_EXIT();
         return;         return;
     }     }
       catch (TooManyElementsException& e)
       {
           PEG_TRACE((TRC_XML,Tracer::LEVEL1,
               "CIMOperationRequestDecoder::handleMethodCall - "
                   "TooManyElementsException has occurred. Message: %s",
               (const char*) e.getMessage().getCString()));
   
           sendHttpError(
               queueId,
               HTTP_STATUS_BADREQUEST,
               "request-with-too-many-elements",
               e.getMessage(),
               closeConnect);
           PEG_METHOD_EXIT();
           return;
       }
     catch (Exception& e)     catch (Exception& e)
     {     {
         // Don't know why I got this exception.  Seems like a bad thing.         // Don't know why I got this exception.  Seems like a bad thing.
Line 1368 
Line 1778 
     if (cimmsg != NULL)     if (cimmsg != NULL)
     {     {
         cimmsg->operationContext.insert(IdentityContainer(userName));         cimmsg->operationContext.insert(IdentityContainer(userName));
           cimmsg->operationContext.insert(UserRoleContainer(userRole));
         cimmsg->operationContext.set(         cimmsg->operationContext.set(
             AcceptLanguageListContainer(httpAcceptLanguages));             AcceptLanguageListContainer(httpAcceptLanguages));
         cimmsg->operationContext.set(         cimmsg->operationContext.set(
Line 1379 
Line 1790 
     }     }
 // l10n end // l10n end
  
   #ifdef PEGASUS_PAM_SESSION_SECURITY
   
       // Whatever happens on the authentication, we need to check for
       // a change of an expired password
       // Since the definition for password updates is not completely
       // defined in DMTF yet, keep this feature PAM_SESSION only
       // This also only works with CIM-XML right now.
       if (isExpiredPassword)
       {
           // only try password update if req. Pragma is set
           if (updateExpiredPassword)
           {
               // update expired password
               // fct. _updateExpiredPassword returns false
               //        if the request was NOT for PG_Account etc.
               _updateExpiredPassword(
                   queueId,
                   httpMethod,
                   messageId,
                   closeConnect,
                   httpContentLanguages,
                   cimmsg,
                   userName,
                   userPass,
                   ipAddress);
           }
           else
           {
               sendUserAccountExpired(
                   queueId,
                   httpMethod,
                   messageId,
                   cimMethodInHeader,
                   closeConnect,
                   isIMethodCall);
           }
           PEG_METHOD_EXIT();
           return;
       }
   #endif
   
     request->setCloseConnect(closeConnect);     request->setCloseConnect(closeConnect);
     _outputQueue->enqueue(request.release());     _outputQueue->enqueue(request.release());
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
   /**************************************************************************
   **
   **  Decode CIM Operation Type Common IParameter types.
   **  Each class defines processing for a particular IPARAM type
   **  (ex. boolean)or parameter name (i.e. propertyListIParam)
   **  Each struct defines:
   **      got - Boolean defines whether this parameter has been found
   **      value - The value container for this type
   **      found(...) - function sets the duplicate flag and the got flag
   **      get - Function to get the defined parameter from the
   **            parser
   **      NOTE: at least one has multiple get.. functions.
   ** NOTE: Some of these are defined for a particular attribute (ex.
   **      propertyListIparam) so the attribute name is integrated into the
   **      methods and others for a whole class of attributes (Boolean,
   **      String,ClassName etc.) so the attribute name is defined as part
   **      of the constructor.
   ***************************************************************************/
  
 CIMCreateClassRequestMessage*  /* base class for common elements of all of the IParam classes
     CIMOperationRequestDecoder::decodeCreateClassRequest(  */
         Uint32 queueId,  class baseIParam
         XmlParser& parser,  
         const String& messageId,  
         const CIMNamespaceName& nameSpace)  
 { {
     PEG_METHOD_ENTER(TRC_DISPATCHER,  public:
         "CIMOperationRequestDecoder::decodeCreateClassRequest()");  
  
     STAT_GETSTARTTIME      // Constructor with defaulted Name. Name set by subclass
       baseIParam():
           got(false) {}
  
     CIMClass newClass;      // Constructor with Name.
     Boolean duplicateParameter = false;      baseIParam(const char* name):
     Boolean gotClass = false;          got(false),
     Boolean emptyTag;          iParamName(name) {}
  
     for (const char* name;      // Set the flag to indicate that this IParam has been gotten and also
          XmlReader::getIParamValueTag(parser, name, emptyTag); )      // set the flag defined by the duplicate parameter
       // @param duplicate Boolean that is set to previous value of the got
       // variable indicating whether this is second call to this IParam
       void found(Boolean& duplicate)
     {     {
         if (System::strcasecmp(name, "NewClass") == 0)          duplicate = got;
           got = true;
       }
   
       String& name()
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);          return iParamName;
             if (!XmlReader::getClassElement(parser, newClass))      }
   
       // Tests if the parameter exists in the request
       // and if it does not, issues an exception
       void rejectIfNotExist()
             {             {
                 throw PEGASUS_CIM_EXCEPTION(          if (!got)
                     CIM_ERR_INVALID_PARAMETER, "NewClass");          {
               _throwCIMExceptionRequiredDoesNotExist(iParamName);
             }             }
             duplicateParameter = gotClass;  
             gotClass = true;  
         }         }
         else  
       // Initial false.  Set true by found function.
       Boolean got;
   
   protected:
       String iParamName;
   
   private:
           // hide unused default constructor and assign, copy constructors
       baseIParam(const baseIParam&);
       baseIParam& operator = (const baseIParam&);
   };
   
   // Common xml attribute accessor for all boolean attributes.   The
   // attribute name is defined in the constructor.
   // The usage pattern is:
   //    Boolean duplicate;     // Flag to indicate multiple calls
   //
   //    booleanIParam xyz("xyz"); default is false for attribute xyz
   //
   //    if(xyz.get(parser, name, emptyTag)   // parses to test if name == xyz
   //        found(duplicate);          // set flag to indicate exists etc.
   class booleanIParam : public baseIParam
         {         {
             PEG_METHOD_EXIT();  public:
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);      Boolean value;
         }  
  
         if (!emptyTag)      // constructor with default value = false
       booleanIParam(const char* name): baseIParam(name), value(false) {}
   
       // constructor with initial value specifically set from the input
   
       booleanIParam(const char* name, Boolean _value): baseIParam(name),
           value(_value)
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }         }
  
         if (duplicateParameter)      // get the value of the parameter if the parameter if it exists.
       // Note that the attribute name is defined in the constructor
       // Value is required.
       // @param parser
       // @param testName attribute name from parse.
       // @emptyTag returns true if emptyTag returned true from parser
       Boolean get(XmlParser& parser, const char * testName,  Boolean& emptyTag)
         {         {
             PEG_METHOD_EXIT();          if (System::strcasecmp(iParamName.getCString(), testName) == 0)
             throw PEGASUS_CIM_EXCEPTION(          {
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);              XmlReader::rejectNullIParamValue(parser, emptyTag,
                   iParamName.getCString());
               XmlReader::getBooleanValueElement(parser, value, true);
               return true;
         }         }
           return false;
     }     }
  
     if (!gotClass)  private:
       // hide unused default constructor and assign, copy constructors
       booleanIParam();
       booleanIParam(const booleanIParam&);
       booleanIParam& operator = (const booleanIParam&);
   };
   
   // decode Iparam to CIMName representing class names.  This struct
   // has two get functions:
   //     get - parse where the parameter value is required
   //     getOptional - parse where the parameter value is optional
   
   class classNameIParam : public baseIParam
     {     {
         PEG_METHOD_EXIT();  public:
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);      CIMName value;
     }  
  
     AutoPtr<CIMCreateClassRequestMessage> request(      // construct an IParam definition with name.
         new CIMCreateClassRequestMessage(      // @param name const char* defining name of IParam to match
             messageId,      // @return true if IParam found with _attrName
             nameSpace,  
             newClass,  
             QueueIdStack(queueId, _returnQueueId)));  
  
     STAT_SERVERSTART      classNameIParam(const char* name): baseIParam(name), value(CIMName()) {}
  
     PEG_METHOD_EXIT();      // Get Required value element.Test for name parameter as IParam with
     return request.release();      // name and if found, if value not NULL, parse the className and
       // set into value
       Boolean get(XmlParser& parser, const char* name, Boolean& emptyTag)
       {
           if (System::strcasecmp(name,iParamName.getCString()) == 0)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getClassNameElement(parser, value, true);
               return true;
 } }
           return false;
 CIMGetClassRequestMessage* CIMOperationRequestDecoder::decodeGetClassRequest(      }
     Uint32 queueId,      // Get Iparam with optional value.
     XmlParser& parser,      Boolean getOptional(XmlParser& parser, const char* name,
     const String& messageId,                          Boolean& emptyTag)
     const CIMNamespaceName& nameSpace)  
 { {
     PEG_METHOD_ENTER(TRC_DISPATCHER,          if (System::strcasecmp(name, iParamName.getCString()) == 0)
         "CIMOperationRequestDecoder::decodeGetClassRequest()");          {
               //  value may be NULL
               if (!emptyTag)
               {
                   XmlReader::getClassNameElement(parser, value, false);
               }
               return true;
           }
           return false;
       }
   private:
       // hide unused default constructor and assign, copy constructors
       classNameIParam();
       classNameIParam(const classNameIParam&);
       classNameIParam& operator = (const classNameIParam&);
   };
  
     STAT_GETSTARTTIME  // test for "InstanceName" iParam and if found, return CIMObjectPath
   // in value
   class instanceNameIParam : public baseIParam
   {
   public:
       CIMObjectPath value;
  
     CIMName className;      instanceNameIParam(const char* name): baseIParam(name),
     Boolean localOnly = true;          value(CIMObjectPath())
     Boolean includeQualifiers = true;      {
     Boolean includeClassOrigin = false;      }
     CIMPropertyList propertyList;  
     Boolean duplicateParameter = false;  
     Boolean gotClassName = false;  
     Boolean gotLocalOnly = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;  
  
     for (const char* name;      Boolean get(XmlParser& parser, const char * name, Boolean& emptyTag)
          XmlReader::getIParamValueTag(parser, name, emptyTag); )  
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if (System::strcasecmp(name, iParamName.getCString()) == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getClassNameElement(parser, className, true);              XmlReader::getInstanceNameElement(parser, value);
             duplicateParameter = gotClassName;              return true;
             gotClassName = true;          }
           return false;
         }         }
         else if (System::strcasecmp(name, "LocalOnly") == 0)  private:
       // hide unused assign, copy constructors
       instanceNameIParam();
       instanceNameIParam(const instanceNameIParam&);
       instanceNameIParam& operator = (const instanceNameIParam&);
   };
   
   // test for "ObjectName" attribute and if found, return CIMObjectPath
   // This struct has an extra attribute, the flag isClassNameElement which
   // returns true if the objectName was a classPath and not an instance
   // path.
   // If Xmlreader returns true, this is class only element, no
   //  key bindings. That state must be set into the request
   //  message (ex. objectName.isClassElement)
   // @param (Optional) Name of IParam.  Default is ObjectName.  Note
   // that pull operations use InstanceName as IParamName.
   class objectNameIParam: public baseIParam
   {
   public:
       CIMObjectPath value;
       bool isClassNameElement;
   
       // Constructor with default parameter name = "ObjectName"
       objectNameIParam(): baseIParam("ObjectName"),
           value(CIMObjectPath()), isClassNameElement(false)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getBooleanValueElement(parser, localOnly, true);  
             duplicateParameter = gotLocalOnly;  
             gotLocalOnly = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)  
       objectNameIParam(const char* name): baseIParam(name),
           value(CIMObjectPath()), isClassNameElement(false)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)  
       Boolean get(XmlParser& parser, const char * name, Boolean& emptyTag)
       {
           if (System::strcasecmp(name, iParamName.getCString()) == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);              isClassNameElement =
             duplicateParameter = gotIncludeClassOrigin;                  XmlReader::getObjectNameElement(parser, value);
             gotIncludeClassOrigin = true;              return true;
           }
           return false;
       }
   private:
       // hide unused assign, copy constructors
       objectNameIParam(const objectNameIParam&);
       objectNameIParam& operator = (const objectNameIParam&);
   };
   
   // test for "PropertyList" attribute and, if found, return property list
   // in the value element.
   class propertyListIParam : public baseIParam
   {
   public:
       CIMPropertyList value;
   
       // construct a propertyListIParam object
       propertyListIParam(): baseIParam(){}
   
       ~propertyListIParam(){}
   
       Boolean get(XmlParser& parser, const char* name, Boolean& emptyTag)
       {
           if (System::strcasecmp(name, "PropertyList") == 0)
           {
               if (!emptyTag)
               {
                   CIMValue pl;
                   if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))
                   {
                       Array<String> propertyListArray;
                       pl.get(propertyListArray);
                       // NOTE: Cannot use the propertyList.set(...) method
                       // here because set does not create propertyList tags
                       value.append(propertyListArray);
                   }
               }
               return true;
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          return false;
       }
   
       // This version of the get function uses the propertyList set function
       // to set the property list array into the propertyList object.  It
       // can only be used for those Operations where the propertylist is NOT
       // used by the Server in the response (i.e. getClass and modifyInstance).
       //
       Boolean getSpecial(XmlParser& parser, const char* name, Boolean& emptyTag)
       {
           if (System::strcasecmp(name, "PropertyList") == 0)
         {         {
             if (!emptyTag)             if (!emptyTag)
             {             {
Line 1519 
Line 2129 
                     Array<String> propertyListArray;                     Array<String> propertyListArray;
                     pl.get(propertyListArray);                     pl.get(propertyListArray);
                     Array<CIMName> cimNameArray;                     Array<CIMName> cimNameArray;
                       // Map the strings to CIMNames.
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)                     for (Uint32 i = 0; i < propertyListArray.size(); i++)
                     {                     {
                         cimNameArray.append(propertyListArray[i]);                         cimNameArray.append(propertyListArray[i]);
                     }                     }
                     propertyList.set(cimNameArray);                      // use set to put list into property list without
                       // setting propertyList tags.
                       value.set(cimNameArray);
                 }                 }
             }             }
             duplicateParameter = gotPropertyList;              return true;
             gotPropertyList = true;  
         }         }
         else          return false;
       }
   private:
       // hide unused default assign, copy constructors
       propertyListIParam(const propertyListIParam&);
       propertyListIParam& operator = (const propertyListIParam&);
   };
   
   // Attribute decoder for String Parameters
   // The constructor MUST include the attribute name.
   // The second defines whether a value is required.
   // If true and there is no value, the XmlReader does an exception.
   
   class stringIParam : public baseIParam
         {         {
             PEG_METHOD_EXIT();  public:
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);      String value;
   
       // constructor with definition of attribute and  required flag.
       // @param name const char* with name of IParam to match
       // @param valueRequired Boolean that defines whether value is required
   
       stringIParam(const char* name, Boolean valueRequired): baseIParam(name),
           _valueRequired(valueRequired) {}
   
       ~stringIParam(){}
   
       // get the attribute if it exists. The attribute name is defined in
       // the constructor
       // @param parser
       // @param testName attribute name from parse.
       // @emptyTag returns true if emptyTag returned true from parser
       // @return Returns true if testName matches the IParam defined by current
       // position in the parser
       Boolean get(XmlParser& parser, const char * testName,  Boolean& emptyTag)
       {
           if (System::strcasecmp(iParamName.getCString(), testName) == 0)
           {
               if (!emptyTag)
               {
                   XmlReader::getStringValueElement(parser, value, _valueRequired);
               }
               return true;
           }
           return false;
       }
   
   private:
       Boolean _valueRequired;
       stringIParam();
       stringIParam(const stringIParam&);
       stringIParam& operator = (const stringIParam&);
   };
   
   //EXP_PULL_BEGIN
   // Attribute decoder for Uint32Arg Parameters
   // The constructor MUST include the attribute name.
   // The second defines whether a value is required.
   // If true and there is no value, the XmlReader does an exception.
   //
   class uint32ArgIParam : public baseIParam
   {
   public:
       // Initally set to NULL. (Server sets timeout time)
       Uint32Arg value;
   
       // constructor with definition of iParam name and default for the
       // required flag (false). Default value of parameter is NULL if
       // no value is supplied.
       // @param name const char* with name of IParam to match
       // The default for Uint32Args in general is NULL. If you want
       // anything else, set it specifically
   
       uint32ArgIParam(const char* name): baseIParam(name),
           _valueRequired(false) {}
   
       // constructor with definition of iParam name and default for the
       // required flag (false). Default value of parameter is integer defined
       // by supplied value.
       // @param name const char* with name of IParam to match
       // @param valueArg Uint32 value to to which the uint32ArgIParam is
       // set.
   
       uint32ArgIParam(const char* name, Uint32 valueArg): baseIParam(name),
           value(valueArg), _valueRequired(false) {}
   
       ~uint32ArgIParam(){}
   
       // get the attribute if it exists. The attribute name is defined in
       // the constructor
       // @param parser
       // @param testName attribute name from parse.
       // @emptyTag returns true if emptyTag returned true from parser
       // @return Returns true if testName matches the IParam defined by current
       // position in the parser
       Boolean get(XmlParser& parser, const char * testName,  Boolean& emptyTag)
       {
           if (_valueRequired)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, testName);
           }
           if (System::strcasecmp(iParamName.getCString(), testName) == 0)
           {
               XmlReader::getUint32ArgValueElement(parser, value, true);
               return true;
           }
           return false;
       }
   private:
       Boolean _valueRequired;
       uint32ArgIParam();
       uint32ArgIParam(const uint32ArgIParam&);
       uint32ArgIParam& operator = (const uint32ArgIParam&);
   };
   
   // Attribute decoder for Uint32 Parameters
   // The constructor MUST include the attribute name.
   // The second defines whether a value is required.
   // If true and there is no value, the XmlReader does an exception.
   
   class uint32IParam : public baseIParam
   {
   public:
       Uint32 value;
   
       // constructor with definition of iParam name and default for the
       // required flag (false). Default value of parameter is NULL if
       // no value is supplied. This is for paramaters that are not required but
       // where the default value is NULL.
       // @param name const char* with name of IParam to match
       uint32IParam(const char* name)
           : baseIParam(name),
           value(0),
           _valueRequired(false)
       {
       }
   
       // constructor with definition of iParam name and default for the
       // required flag (false). Default value of parameter is integer defined
       // by supplied value. This is for parameters that are not required but
       // for which there is a nonNull default value if the parameter is not
       // supplied.
       // @param name const char* with name of IParam to match
       // @param uint32Value Uint32 value that is the default if the paramter
       // is not  found.
       // @param rqd Boolean (optional) that defines whether the parameter is
       // required on input.  If it is required, the iomt32Value is not used
   
       uint32IParam(const char* name, Uint32 _value, Boolean rqd = false)
           : baseIParam(name), value(0), _valueRequired(rqd) {}
   
       // get the attribute if it exists. The attribute name is defined in
       // the constructor
       // @param parser
       // @param testName attribute name from parse.
       // @emptyTag returns true if emptyTag returned true from parser
       // @return Returns true if testName matches the IParam defined by current
       // position in the parser
       Boolean get(XmlParser& parser, const char * testName,  Boolean& emptyTag)
       {
           if (_valueRequired)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, testName);
           }
           if (System::strcasecmp(iParamName.getCString(), testName) == 0)
           {
               XmlReader::getUint32ValueElement(parser, value, true);
               return true;
           }
           return false;
         }         }
  
   private:
       Boolean _valueRequired;
       uint32IParam();
       uint32IParam(const uint32IParam&);
       uint32IParam& operator = (const uint32IParam&);
   };
   // EXP_PULL_END
   
   /************************************************************************
   **
   **      Common functions used by the decoders to avoid duplicate code.
   **
   **************************************************************************/
   // test for valid end of XML and duplicate parameters on input
   // This function returns if OK or executes appropriate exceptions if there
   // is either a duplicate (duplicateParameter == true) or the
   // end tag IPARAMVALUE is not found.
   void _checkMissingEndTagOrDuplicateParamValue(
       XmlParser& parser, Boolean duplicateParameter, Boolean emptyTag)
   {
         if (!emptyTag)         if (!emptyTag)
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");             XmlReader::expectEndTag(parser, "IPARAMVALUE");
Line 1542 
Line 2340 
  
         if (duplicateParameter)         if (duplicateParameter)
         {         {
             PEG_METHOD_EXIT();          _throwCIMExceptionDuplicateParameter();
             throw PEGASUS_CIM_EXCEPTION(  
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
     }     }
  
     if (!gotClassName)  /**************************************************************************
   **
   **  Decode each CIMOperation type, processing the parameters for that type
   **  and producing either a CIMMessage of the appropriate type or
   **  an exception.
   **
   ***************************************************************************/
   
   CIMCreateClassRequestMessage*
       CIMOperationRequestDecoder::decodeCreateClassRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
     {     {
         PEG_METHOD_EXIT();      STAT_GETSTARTTIME
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
       CIMClass newClass;
       Boolean gotNewClass = false;
   
       Boolean emptyTag;
       Boolean duplicateParameter = false;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if (System::strcasecmp(name, "NewClass") == 0)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               if (!XmlReader::getClassElement(parser, newClass))
               {
                   _throwCIMExceptionInvalidParameter("NewClass");
               }
               duplicateParameter = gotNewClass;
               gotNewClass = true;
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(gotNewClass);
   
       AutoPtr<CIMCreateClassRequestMessage> request(
           new CIMCreateClassRequestMessage(
               messageId,
               nameSpace,
               newClass,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMGetClassRequestMessage* CIMOperationRequestDecoder::decodeGetClassRequest(
       Uint32 queueId,
       XmlParser& parser,
       const String& messageId,
       const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       // GetClass Parameters
       classNameIParam className("ClassName");
       booleanIParam localOnly("localOnly",true);
       booleanIParam includeQualifiers("IncludeQualifiers", true);
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(className.get(parser, name, emptyTag))
           {
               className.found(duplicateParameter);
           }
           else if(localOnly.get(parser, name, emptyTag))
           {
               localOnly.found(duplicateParameter);
           }
           else if(includeQualifiers.get(parser, name, emptyTag))
           {
               includeQualifiers.found(duplicateParameter);
           }
           else if(includeClassOrigin.get(parser, name,  emptyTag))
           {
               includeClassOrigin.found(duplicateParameter);
           }
           else if(propertyList.getSpecial(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // reject if required parameter does not exist
       className.rejectIfNotExist();
   
       // Build message
     AutoPtr<CIMGetClassRequestMessage> request(new CIMGetClassRequestMessage(     AutoPtr<CIMGetClassRequestMessage> request(new CIMGetClassRequestMessage(
         messageId,         messageId,
         nameSpace,         nameSpace,
         className,          className.value,
         localOnly,          localOnly.value,
         includeQualifiers,          includeQualifiers.value,
         includeClassOrigin,          includeClassOrigin.value,
         propertyList,          propertyList.value,
         QueueIdStack(queueId, _returnQueueId)));         QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     PEG_METHOD_EXIT();  
     return request.release();     return request.release();
 } }
  
Line 1580 
Line 2484 
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMClass modifiedClass;     CIMClass modifiedClass;
     Boolean duplicateParameter = false;  
     Boolean gotClass = false;     Boolean gotClass = false;
   
     Boolean emptyTag;     Boolean emptyTag;
       Boolean duplicateParameter = false;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
Line 1592 
Line 2497 
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             if (!XmlReader::getClassElement(parser, modifiedClass))             if (!XmlReader::getClassElement(parser, modifiedClass))
             {             {
                 throw PEGASUS_CIM_EXCEPTION(                  _throwCIMExceptionInvalidParameter("ModifiedClass");
                     CIM_ERR_INVALID_PARAMETER, "ModifiedClass");  
             }             }
             duplicateParameter = gotClass;             duplicateParameter = gotClass;
             gotClass = true;             gotClass = true;
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }  
   
         if (!emptyTag)  
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotClass)      _testRequiredParametersExist("ModifiedClass", gotClass);
     {  
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }  
  
     AutoPtr<CIMModifyClassRequestMessage> request(     AutoPtr<CIMModifyClassRequestMessage> request(
         new CIMModifyClassRequestMessage(         new CIMModifyClassRequestMessage(
Line 1641 
Line 2535 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMName className;      classNameIParam className("ClassName");
     Boolean deepInheritance = false;      booleanIParam deepInheritance("DeepInheritance");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotClassName = false;  
     Boolean gotDeepInheritance = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if(className.getOptional(parser, name, emptyTag))
         {  
             //  
             //  ClassName may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, className, false);              className.found(duplicateParameter);
             }             }
             duplicateParameter = gotClassName;          else if(deepInheritance.get(parser, name, emptyTag))
             gotClassName = true;  
         }  
         else if (System::strcasecmp(name, "DeepInheritance") == 0)  
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              deepInheritance.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, deepInheritance, true);  
             duplicateParameter = gotDeepInheritance;  
             gotDeepInheritance = true;  
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (!emptyTag)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              parser, duplicateParameter, emptyTag);
         }         }
  
         if (duplicateParameter)      // NOTE: className not required for this operation
         {  
             throw PEGASUS_CIM_EXCEPTION(  
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }  
  
     AutoPtr<CIMEnumerateClassNamesRequestMessage> request(     AutoPtr<CIMEnumerateClassNamesRequestMessage> request(
         new CIMEnumerateClassNamesRequestMessage(         new CIMEnumerateClassNamesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             className,              className.value,
             deepInheritance,              deepInheritance.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 1709 
Line 2586 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMName className;      // EnumerateClasses Parameters
     Boolean deepInheritance = false;      classNameIParam className("ClassName");
     Boolean localOnly = true;      booleanIParam deepInheritance("deepInheritance");
     Boolean includeQualifiers = true;      booleanIParam localOnly("localOnly",true);
     Boolean includeClassOrigin = false;      booleanIParam includeQualifiers("IncludeQualifiers", true);
       booleanIParam includeClassOrigin("IncludeClassOrigin");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotClassName = false;  
     Boolean gotDeepInheritance = false;  
     Boolean gotLocalOnly = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if(className.getOptional(parser, name, emptyTag))
         {         {
             //              className.found(duplicateParameter);
             //  ClassName may be NULL  
             //  
             if (!emptyTag)  
             {  
                 XmlReader::getClassNameElement(parser, className, false);  
             }             }
             duplicateParameter = gotClassName;          else if(deepInheritance.get(parser, name, emptyTag))
             gotClassName = true;  
         }  
         else if (System::strcasecmp(name, "DeepInheritance") == 0)  
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              deepInheritance.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, deepInheritance, true);  
             duplicateParameter = gotDeepInheritance;  
             gotDeepInheritance = true;  
         }         }
         else if (System::strcasecmp(name, "LocalOnly") == 0)          else if(localOnly.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              localOnly.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, localOnly, true);  
             duplicateParameter = gotLocalOnly;  
             gotLocalOnly = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)          else if(includeQualifiers.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              includeQualifiers.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)          else if(includeClassOrigin.get(parser, name,  emptyTag))
           {
               includeClassOrigin.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // NOTE: Class name not required for this enumerate.
   
       AutoPtr<CIMEnumerateClassesRequestMessage> request(
           new CIMEnumerateClassesRequestMessage(
               messageId,
               nameSpace,
               className.value,
               deepInheritance.value,
               localOnly.value,
               includeQualifiers.value,
               includeClassOrigin.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMDeleteClassRequestMessage*
       CIMOperationRequestDecoder::decodeDeleteClassRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       classNameIParam className("ClassName");
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(className.get(parser, name, emptyTag))
           {
               className.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(className.name(),className.got);
   
       AutoPtr<CIMDeleteClassRequestMessage> request(
           new CIMDeleteClassRequestMessage(
               messageId,
               nameSpace,
               className.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMCreateInstanceRequestMessage*
       CIMOperationRequestDecoder::decodeCreateInstanceRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       CIMInstance newInstance;
       Boolean gotInstance = false;
   
       Boolean emptyTag;
       Boolean duplicateParameter = false;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if (System::strcasecmp(name, "NewInstance") == 0)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getInstanceElement(parser, newInstance);
               duplicateParameter = gotInstance;
               gotInstance = true;
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist("NewInstance", gotInstance);
   
       AutoPtr<CIMCreateInstanceRequestMessage> request(
           new CIMCreateInstanceRequestMessage(
               messageId,
               nameSpace,
               newInstance,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMGetInstanceRequestMessage*
       CIMOperationRequestDecoder::decodeGetInstanceRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       instanceNameIParam instanceName("InstanceName");
       // This attribute is accepted for compatibility reasons, but is
       // not honored because it is deprecated.
       booleanIParam localOnly("localOnly",true);
       booleanIParam includeQualifiers("IncludeQualifiers");
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(instanceName.get(parser, name, emptyTag))
           {
               instanceName.found(duplicateParameter);
           }
           // localOnly is accepted for compatibility reasons, but is
           // not honored because it is deprecated.
           else if(localOnly.get(parser, name, emptyTag))
           {
               localOnly.found(duplicateParameter);
           }
           else if(includeQualifiers.get(parser, name, emptyTag))
           {
               includeQualifiers.found(duplicateParameter);
           }
           else if(includeClassOrigin.get(parser, name,  emptyTag))
           {
               includeClassOrigin.found(duplicateParameter);
           }
           else if(propertyList.get(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(instanceName.got);
   
       AutoPtr<CIMGetInstanceRequestMessage> request(
           new CIMGetInstanceRequestMessage(
               messageId,
               nameSpace,
               instanceName.value,
   #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS
               false,
   #else
               includeQualifiers.value,
   #endif
               includeClassOrigin.value,
               propertyList.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   
   CIMModifyInstanceRequestMessage*
       CIMOperationRequestDecoder::decodeModifyInstanceRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       CIMInstance modifiedInstance;
       Boolean gotInstance = false;
   
       booleanIParam includeQualifiers("IncludeQualifiers", true);
       propertyListIParam propertyList;
   
       Boolean emptyTag;
       Boolean duplicateParameter = false;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if (System::strcasecmp(name, "ModifiedInstance") == 0)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getNamedInstanceElement(parser, modifiedInstance);
               duplicateParameter = gotInstance;
               gotInstance = true;
           }
           else if(includeQualifiers.get(parser, name, emptyTag))
           {
               includeQualifiers.found(duplicateParameter);
           }
           else if(propertyList.getSpecial(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist("ModifiedInstance", gotInstance);
   
       AutoPtr<CIMModifyInstanceRequestMessage> request(
           new CIMModifyInstanceRequestMessage(
               messageId,
               nameSpace,
               modifiedInstance,
               includeQualifiers.value,
               propertyList.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMEnumerateInstancesRequestMessage*
       CIMOperationRequestDecoder::decodeEnumerateInstancesRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       // EnumerateInstance Parameters
       classNameIParam className("ClassName");
       booleanIParam deepInheritance("DeepInheritance", true);
       // localOnly is accepted for compatibility reasons, but is
       // not honored because it is deprecated.
       booleanIParam localOnly("localOnly", true);
       booleanIParam includeQualifiers("IncludeQualifiers");
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(className.get(parser, name, emptyTag))
           {
               className.found(duplicateParameter);
           }
           else if(deepInheritance.get(parser, name, emptyTag))
           {
               deepInheritance.found(duplicateParameter);
           }
           // This attribute is accepted for compatibility reasons, but is
           // not honored because it is deprecated.
           else if(localOnly.get(parser, name, emptyTag))
           {
               localOnly.found(duplicateParameter);
           }
           else if(includeQualifiers.get(parser, name, emptyTag))
           {
               includeQualifiers.found(duplicateParameter);
           }
           else if(includeClassOrigin.get(parser, name,  emptyTag))
           {
               includeClassOrigin.found(duplicateParameter);
           }
           else if(propertyList.get(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // Reject if required parameter does not exist in request
       className.rejectIfNotExist();
   
       AutoPtr<CIMEnumerateInstancesRequestMessage> request(
           new CIMEnumerateInstancesRequestMessage(
               messageId,
               nameSpace,
               className.value,
               deepInheritance.value,
   #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS
               false,
   #else
               includeQualifiers.value,
   #endif
               includeClassOrigin.value,
               propertyList.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMEnumerateInstanceNamesRequestMessage*
       CIMOperationRequestDecoder::decodeEnumerateInstanceNamesRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       classNameIParam className("ClassName");
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(className.get(parser, name, emptyTag))
           {
               className.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // Reject if required parameter does not exist in request
       className.rejectIfNotExist();
   
       AutoPtr<CIMEnumerateInstanceNamesRequestMessage> request(
           new CIMEnumerateInstanceNamesRequestMessage(
               messageId,
               nameSpace,
               className.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMDeleteInstanceRequestMessage*
       CIMOperationRequestDecoder::decodeDeleteInstanceRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       instanceNameIParam instanceName("InstanceName");
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if(instanceName.get(parser, name, emptyTag))
           {
               instanceName.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(instanceName.got);
   
       AutoPtr<CIMDeleteInstanceRequestMessage> request(
           new CIMDeleteInstanceRequestMessage(
               messageId,
               nameSpace,
               instanceName.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMSetQualifierRequestMessage*
       CIMOperationRequestDecoder::decodeSetQualifierRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       CIMQualifierDecl qualifierDeclaration;
       Boolean duplicateParameter = false;
       Boolean gotQualifierDeclaration = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if (System::strcasecmp(name, "QualifierDeclaration") == 0)
           {
               XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getQualifierDeclElement(parser, qualifierDeclaration);
               duplicateParameter = gotQualifierDeclaration;
               gotQualifierDeclaration = true;
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(gotQualifierDeclaration);
   
       AutoPtr<CIMSetQualifierRequestMessage> request(
           new CIMSetQualifierRequestMessage(
               messageId,
               nameSpace,
               qualifierDeclaration,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
   }
   
   CIMGetQualifierRequestMessage*
       CIMOperationRequestDecoder::decodeGetQualifierRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
   {
       STAT_GETSTARTTIME
   
       String qualifierNameString;
       CIMName qualifierName;
       Boolean duplicateParameter = false;
       Boolean gotQualifierName = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           if (System::strcasecmp(name, "QualifierName") == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);              XmlReader::getStringValueElement(parser, qualifierNameString, true);
             duplicateParameter = gotIncludeClassOrigin;              qualifierName = qualifierNameString;
             gotIncludeClassOrigin = true;              duplicateParameter = gotQualifierName;
               gotQualifierName = true;
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
           }
   
           // generate exception if endtag error or duplicate attributes
           _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
         }         }
  
         if (!emptyTag)      _testRequiredParametersExist(gotQualifierName);
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");      AutoPtr<CIMGetQualifierRequestMessage> request(
           new CIMGetQualifierRequestMessage(
               messageId,
               nameSpace,
               qualifierName,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
         }         }
  
         if (duplicateParameter)  CIMEnumerateQualifiersRequestMessage*
       CIMOperationRequestDecoder::decodeEnumerateQualifiersRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMNamespaceName& nameSpace)
         {         {
             throw PEGASUS_CIM_EXCEPTION(      STAT_GETSTARTTIME
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);      Boolean emptyTag;
         }  
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
       {
           // No IPARAMVALUEs are defined for this operation
           _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMEnumerateClassesRequestMessage> request(      AutoPtr<CIMEnumerateQualifiersRequestMessage> request(
         new CIMEnumerateClassesRequestMessage(          new CIMEnumerateQualifiersRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             className,  
             deepInheritance,  
             localOnly,  
             includeQualifiers,  
             includeClassOrigin,  
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 1798 
Line 3180 
     return request.release();     return request.release();
 } }
  
 CIMDeleteClassRequestMessage*  CIMDeleteQualifierRequestMessage*
     CIMOperationRequestDecoder::decodeDeleteClassRequest(      CIMOperationRequestDecoder::decodeDeleteQualifierRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 1807 
Line 3189 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMName className;      String qualifierNameString;
     Boolean duplicateParameter = false;      CIMName qualifierName;
     Boolean gotClassName = false;      Boolean gotQualifierName = false;
   
     Boolean emptyTag;     Boolean emptyTag;
       Boolean duplicateParameter = false;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if (System::strcasecmp(name, "QualifierName") == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getClassNameElement(parser, className);              XmlReader::getStringValueElement(parser, qualifierNameString, true);
             duplicateParameter = gotClassName;              qualifierName = qualifierNameString;
             gotClassName = true;              duplicateParameter = gotQualifierName;
               gotQualifierName = true;
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (!emptyTag)  
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }  
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotClassName)      _testRequiredParametersExist(gotQualifierName);
     {  
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }  
  
     AutoPtr<CIMDeleteClassRequestMessage> request(      AutoPtr<CIMDeleteQualifierRequestMessage> request(
         new CIMDeleteClassRequestMessage(          new CIMDeleteQualifierRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             className,              qualifierName,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 1856 
Line 3232 
     return request.release();     return request.release();
 } }
  
 CIMCreateInstanceRequestMessage*  CIMReferenceNamesRequestMessage*
     CIMOperationRequestDecoder::decodeCreateInstanceRequest(      CIMOperationRequestDecoder::decodeReferenceNamesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
         const CIMNamespaceName& nameSpace)         const CIMNamespaceName& nameSpace)
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
       objectNameIParam objectName;
       classNameIParam resultClass("ResultClass");
       stringIParam role("role", false);
  
     CIMInstance newInstance;  
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotInstance = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "NewInstance") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getInstanceElement(parser, newInstance);  
             duplicateParameter = gotInstance;  
             gotInstance = true;  
         }         }
         else          else if (resultClass.getOptional(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              resultClass.found(duplicateParameter);
         }         }
           else if(role.get(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              role.found(duplicateParameter);
         }         }
           else
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              _throwCIMExceptionInvalidIParamName(name);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotInstance)          // generate exception if endtag error or duplicate attributes
     {          _checkMissingEndTagOrDuplicateParamValue(
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              parser, duplicateParameter, emptyTag);
     }     }
  
     AutoPtr<CIMCreateInstanceRequestMessage> request(      // Reject if required parameter does not exist in request
         new CIMCreateInstanceRequestMessage(      objectName.rejectIfNotExist();
   
       AutoPtr<CIMReferenceNamesRequestMessage> request(
           new CIMReferenceNamesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             newInstance,              objectName.value,
             QueueIdStack(queueId, _returnQueueId)));              resultClass.value,
               role.value,
               QueueIdStack(queueId, _returnQueueId),
               objectName.isClassNameElement));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
  
 CIMGetInstanceRequestMessage*  CIMReferencesRequestMessage*
     CIMOperationRequestDecoder::decodeGetInstanceRequest(      CIMOperationRequestDecoder::decodeReferencesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 1923 
Line 3299 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath instanceName;      objectNameIParam objectName;
     Boolean includeQualifiers = false;      classNameIParam resultClass("ResultClass");
     Boolean includeClassOrigin = false;      stringIParam role("role", false);
     CIMPropertyList propertyList;      booleanIParam includeQualifiers("IncludeQualifiers");
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotInstanceName = false;  
     Boolean gotLocalOnly = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "InstanceName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getInstanceNameElement(parser, instanceName);  
             duplicateParameter = gotInstanceName;  
             gotInstanceName = true;  
         }         }
         else if (System::strcasecmp(name, "LocalOnly") == 0)          else if(role.get(parser, name, emptyTag))
         {         {
             // This attribute is accepted for compatibility reasons, but is              role.found(duplicateParameter);
             // not honored because it is deprecated.  
             Boolean localOnly;  
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getBooleanValueElement(parser, localOnly, true);  
             duplicateParameter = gotLocalOnly;  
             gotLocalOnly = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              resultClass.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)          else if(includeQualifiers.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              includeQualifiers.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);  
             duplicateParameter = gotIncludeClassOrigin;  
             gotIncludeClassOrigin = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          else if(includeClassOrigin.get(parser, name,  emptyTag))
         {  
             if (!emptyTag)  
             {  
                 CIMValue pl;  
                 if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))  
                 {  
                     Array<String> propertyListArray;  
                     pl.get(propertyListArray);  
                     Array<CIMName> cimNameArray;  
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)  
                     {                     {
                         cimNameArray.append(propertyListArray[i]);              includeClassOrigin.found(duplicateParameter);
                     }  
                     propertyList.set(cimNameArray);  
                 }  
             }  
             duplicateParameter = gotPropertyList;  
             gotPropertyList = true;  
         }         }
         else          else if(propertyList.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              propertyList.found(duplicateParameter);
         }         }
           else
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotInstanceName)      // Reject if required parameter does not exist in request
     {      objectName.rejectIfNotExist();
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }  
  
     AutoPtr<CIMGetInstanceRequestMessage> request(      AutoPtr<CIMReferencesRequestMessage> request(
         new CIMGetInstanceRequestMessage(          new CIMReferencesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             instanceName,              objectName.value,
 #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS              resultClass.value,
             false,              role.value,
 #else              includeQualifiers.value,
             includeQualifiers,              includeClassOrigin.value,
 #endif              propertyList.value,
             includeClassOrigin,              QueueIdStack(queueId, _returnQueueId),
             propertyList,              objectName.isClassNameElement));
             QueueIdStack(queueId, _returnQueueId)));  
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
  
 CIMModifyInstanceRequestMessage*  CIMAssociatorNamesRequestMessage*
     CIMOperationRequestDecoder::decodeModifyInstanceRequest(      CIMOperationRequestDecoder::decodeAssociatorNamesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2039 
Line 3376 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMInstance modifiedInstance;      objectNameIParam objectName;
     Boolean includeQualifiers = true;      classNameIParam assocClass("AssocClass");
     CIMPropertyList propertyList;      classNameIParam resultClass("ResultClass");
     Boolean duplicateParameter = false;      stringIParam role("role", false);
     Boolean gotInstance = false;      stringIParam resultRole("Resultrole", false);
     Boolean gotIncludeQualifiers = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;     Boolean emptyTag;
       Boolean duplicateParameter = false;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ModifiedInstance") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getNamedInstanceElement(parser, modifiedInstance);  
             duplicateParameter = gotInstance;  
             gotInstance = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)          else if (assocClass.getOptional(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              assocClass.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {  
             if (!emptyTag)  
             {  
                 CIMValue pl;  
                 if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))  
                 {                 {
                     Array<String> propertyListArray;              resultClass.found(duplicateParameter);
                     pl.get(propertyListArray);  
                     Array<CIMName> cimNameArray;  
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)  
                     {  
                         cimNameArray.append(propertyListArray[i]);  
                     }  
                     propertyList.set(cimNameArray);  
                 }                 }
           else if(role.get(parser, name, emptyTag))
           {
               role.found(duplicateParameter);
             }             }
             duplicateParameter = gotPropertyList;          else if(resultRole.get(parser, name, emptyTag))
             gotPropertyList = true;          {
               resultRole.found(duplicateParameter);
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }  
  
         if (!emptyTag)  
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotInstance)      // Reject if required parameter does not exist in request
     {      objectName.rejectIfNotExist();
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }  
  
     AutoPtr<CIMModifyInstanceRequestMessage> request(      AutoPtr<CIMAssociatorNamesRequestMessage> request(
         new CIMModifyInstanceRequestMessage(          new CIMAssociatorNamesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             modifiedInstance,              objectName.value,
             includeQualifiers,              assocClass.value,
             propertyList,              resultClass.value,
             QueueIdStack(queueId, _returnQueueId)));              role.value,
               resultRole.value,
               QueueIdStack(queueId, _returnQueueId),
               objectName.isClassNameElement));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
  
 CIMEnumerateInstancesRequestMessage*  CIMAssociatorsRequestMessage*
     CIMOperationRequestDecoder::decodeEnumerateInstancesRequest(      CIMOperationRequestDecoder::decodeAssociatorsRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2130 
Line 3448 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMName className;      // Associator Operation Parameter Declarations
     Boolean deepInheritance = true;      objectNameIParam objectName;
     Boolean includeQualifiers = false;      classNameIParam assocClass("AssocClass");
     Boolean includeClassOrigin = false;      classNameIParam resultClass("ResultClass");
     CIMPropertyList propertyList;      stringIParam resultRole("Resultrole", false);
       stringIParam role("role", false);
       booleanIParam includeQualifiers("IncludeQualifiers");
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotClassName = false;  
     Boolean gotDeepInheritance = false;  
     Boolean gotLocalOnly = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getClassNameElement(parser, className, true);  
             duplicateParameter = gotClassName;  
             gotClassName = true;  
         }         }
         else if (System::strcasecmp(name, "DeepInheritance") == 0)          else if (assocClass.getOptional(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              assocClass.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, deepInheritance, true);  
             duplicateParameter = gotDeepInheritance;  
             gotDeepInheritance = true;  
         }         }
         else if (System::strcasecmp(name, "LocalOnly") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {         {
             // This attribute is accepted for compatibility reasons, but is              resultClass.found(duplicateParameter);
             // not honored because it is deprecated.  
             Boolean localOnly;  
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getBooleanValueElement(parser, localOnly, true);  
             duplicateParameter = gotLocalOnly;  
             gotLocalOnly = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)          else if(role.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              role.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)          else if(resultRole.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              resultRole.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);  
             duplicateParameter = gotIncludeClassOrigin;  
             gotIncludeClassOrigin = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          else if(includeQualifiers.get(parser, name, emptyTag))
         {  
             if (!emptyTag)  
             {  
                 CIMValue pl;  
                 if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))  
                 {  
                     Array<String> propertyListArray;  
                     pl.get(propertyListArray);  
                     Array<CIMName> cimNameArray;  
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)  
                     {                     {
                         cimNameArray.append(propertyListArray[i]);              includeQualifiers.found(duplicateParameter);
                     }  
                     propertyList.set(cimNameArray);  
                 }                 }
             }          else if(includeClassOrigin.get(parser, name,  emptyTag))
             duplicateParameter = gotPropertyList;  
             gotPropertyList = true;  
         }  
         else  
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              includeClassOrigin.found(duplicateParameter);
         }         }
           else if(propertyList.get(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              propertyList.found(duplicateParameter);
         }         }
           else
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              _throwCIMExceptionInvalidIParamName(name);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotClassName)          // generate exception if endtag error or duplicate attributes
     {          _checkMissingEndTagOrDuplicateParamValue(
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              parser, duplicateParameter, emptyTag);
     }     }
  
     AutoPtr<CIMEnumerateInstancesRequestMessage> request(      // Reject if required parameter does not exist in request
         new CIMEnumerateInstancesRequestMessage(      objectName.rejectIfNotExist();
   
       AutoPtr<CIMAssociatorsRequestMessage> request(
           new CIMAssociatorsRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             className,              objectName.value,
             deepInheritance,              assocClass.value,
 #ifdef PEGASUS_DISABLE_INSTANCE_QUALIFIERS              resultClass.value,
             false,              role.value,
 #else              resultRole.value,
             includeQualifiers,              includeQualifiers.value,
 #endif              includeClassOrigin.value,
             includeClassOrigin,              propertyList.value,
             propertyList,              QueueIdStack(queueId, _returnQueueId),
             QueueIdStack(queueId, _returnQueueId)));              objectName.isClassNameElement));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
  
 CIMEnumerateInstanceNamesRequestMessage*  CIMGetPropertyRequestMessage*
     CIMOperationRequestDecoder::decodeEnumerateInstanceNamesRequest(      CIMOperationRequestDecoder::decodeGetPropertyRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2256 
Line 3538 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMName className;      CIMObjectPath instanceName;
       String propertyName;
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotClassName = false;      Boolean gotInstanceName = false;
       Boolean gotPropertyName = false;
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ClassName") == 0)          if (System::strcasecmp(name, "InstanceName") == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getClassNameElement(parser, className, true);              XmlReader::getInstanceNameElement(parser, instanceName);
             duplicateParameter = gotClassName;              duplicateParameter = gotInstanceName;
             gotClassName = true;              gotInstanceName = true;
         }         }
         else          else if (System::strcasecmp(name, "PropertyName") == 0)
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getStringValueElement(parser, propertyName, true);
               duplicateParameter = gotPropertyName;
               gotPropertyName = true;
         }         }
           else
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotClassName)      _testRequiredParametersExist(gotInstanceName && gotPropertyName);
     {  
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }  
  
     AutoPtr<CIMEnumerateInstanceNamesRequestMessage> request(      AutoPtr<CIMGetPropertyRequestMessage> request(
         new CIMEnumerateInstanceNamesRequestMessage(          new CIMGetPropertyRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             className,              instanceName,
               propertyName,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2305 
Line 3587 
     return request.release();     return request.release();
 } }
  
 CIMDeleteInstanceRequestMessage*  CIMSetPropertyRequestMessage*
     CIMOperationRequestDecoder::decodeDeleteInstanceRequest(      CIMOperationRequestDecoder::decodeSetPropertyRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2315 
Line 3597 
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath instanceName;     CIMObjectPath instanceName;
       String propertyName;
       CIMValue propertyValue;
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotInstanceName = false;     Boolean gotInstanceName = false;
       Boolean gotPropertyName = false;
       Boolean gotNewValue = false;
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
Line 2329 
Line 3615 
             duplicateParameter = gotInstanceName;             duplicateParameter = gotInstanceName;
             gotInstanceName = true;             gotInstanceName = true;
         }         }
         else          else if (System::strcasecmp(name, "PropertyName") == 0)
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              XmlReader::rejectNullIParamValue(parser, emptyTag, name);
               XmlReader::getStringValueElement(parser, propertyName, true);
               duplicateParameter = gotPropertyName;
               gotPropertyName = true;
         }         }
           else if (System::strcasecmp(name, "NewValue") == 0)
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              if (emptyTag || !XmlReader::getPropertyValue(parser, propertyValue))
         }  
   
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(                  propertyValue.setNullValue(CIMTYPE_STRING, false);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
               duplicateParameter = gotNewValue;
               gotNewValue = true;
     }     }
           else
     if (!gotInstanceName)  
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMDeleteInstanceRequestMessage> request(          // generate exception if endtag error or duplicate attributes
         new CIMDeleteInstanceRequestMessage(          _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(gotInstanceName && gotPropertyName);
   
       AutoPtr<CIMSetPropertyRequestMessage> request(
           new CIMSetPropertyRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             instanceName,             instanceName,
               propertyName,
               propertyValue,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2363 
Line 3657 
     return request.release();     return request.release();
 } }
  
 CIMSetQualifierRequestMessage*  CIMExecQueryRequestMessage* CIMOperationRequestDecoder::decodeExecQueryRequest(
     CIMOperationRequestDecoder::decodeSetQualifierRequest(  
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2372 
Line 3665 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMQualifierDecl qualifierDeclaration;      // define execQuery parameters.  Values are required parameters exist.
     Boolean duplicateParameter = false;      stringIParam queryLanguage("QueryLanguage", true);
     Boolean gotQualifierDeclaration = false;      stringIParam query("Query", true);
   
     Boolean emptyTag;     Boolean emptyTag;
       Boolean duplicateParameter = false;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "QualifierDeclaration") == 0)          if(queryLanguage.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              queryLanguage.found(duplicateParameter);
             XmlReader::getQualifierDeclElement(parser, qualifierDeclaration);  
             duplicateParameter = gotQualifierDeclaration;  
             gotQualifierDeclaration = true;  
         }         }
         else          else if(query.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              query.found(duplicateParameter);
         }         }
           else
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(parser,
             throw PEGASUS_CIM_EXCEPTION(              duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
   
       _testRequiredParametersExist(queryLanguage.got && query.got);
   
       AutoPtr<CIMExecQueryRequestMessage> request(
           new CIMExecQueryRequestMessage(
               messageId,
               nameSpace,
               queryLanguage.value,
               query.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
     }     }
  
     if (!gotQualifierDeclaration)  CIMInvokeMethodRequestMessage*
       CIMOperationRequestDecoder::decodeInvokeMethodRequest(
           Uint32 queueId,
           XmlParser& parser,
           const String& messageId,
           const CIMObjectPath& reference,
           const String& cimMethodName)
   {
       STAT_GETSTARTTIME
   
       CIMParamValue paramValue;
       Array<CIMParamValue> inParameters;
   
       while (XmlReader::getParamValueElement(parser, paramValue))
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);          inParameters.append(paramValue);
     }     }
  
     AutoPtr<CIMSetQualifierRequestMessage> request(      AutoPtr<CIMInvokeMethodRequestMessage> request(
         new CIMSetQualifierRequestMessage(          new CIMInvokeMethodRequestMessage(
             messageId,             messageId,
             nameSpace,              reference.getNameSpace(),
             qualifierDeclaration,              reference,
               cimMethodName,
               inParameters,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2421 
Line 3740 
     return request.release();     return request.release();
 } }
  
 CIMGetQualifierRequestMessage*  // EXP_PULL_BEGIN
     CIMOperationRequestDecoder::decodeGetQualifierRequest(  CIMOpenEnumerateInstancesRequestMessage*
       CIMOperationRequestDecoder::decodeOpenEnumerateInstancesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2430 
Line 3750 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     String qualifierNameString;      // EnumerateInstance Parameters
     CIMName qualifierName;      classNameIParam className("ClassName");
       booleanIParam deepInheritance("DeepInheritance", true);
       booleanIParam includeQualifiers("IncludeQualifiers");
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
       // the following are optional parameters for all of the Open requests
       // [IN,OPTIONAL,NULL] string FilterQueryLanguage = NULL,
       // [IN,OPTIONAL,NULL] string FilterQuery = NULL,
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       //[IN,OPTIONAL] Boolean ContinueOnError = false,
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL
       // The default for this parameter is NULL (Server; server sets timeout)
       uint32ArgIParam operationTimeout("OperationTimeout");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotQualifierName = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "QualifierName") == 0)          if(className.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              className.found(duplicateParameter);
             XmlReader::getStringValueElement(parser, qualifierNameString, true);  
             qualifierName = qualifierNameString;  
             duplicateParameter = gotQualifierName;  
             gotQualifierName = true;  
         }         }
         else          else if(deepInheritance.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              deepInheritance.found(duplicateParameter);
         }         }
           else if(includeQualifiers.get(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              includeQualifiers.found(duplicateParameter);
         }         }
           else if(includeClassOrigin.get(parser, name,  emptyTag))
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              includeClassOrigin.found(duplicateParameter);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
           // [IN,OPTIONAL,NULL] string FilterQueryLanguage = NULL,
           else if(filterQueryLanguage.get(parser, name, emptyTag))
           {
               filterQueryLanguage.found(duplicateParameter);
     }     }
           // [IN,OPTIONAL,NULL] string FilterQuery = NULL,
     if (!gotQualifierName)          else if(filterQuery.get(parser, name, emptyTag))
           {
               filterQuery.found(duplicateParameter);
           }
           // [IN,OPTIONAL] Boolean ContinueOnError = false,
           else if (continueOnError.get(parser, name, emptyTag))
           {
               continueOnError.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
           else if (operationTimeout.get(parser, name, emptyTag))
           {
               operationTimeout.found(duplicateParameter);
           }
           // [IN,OPTIONAL] uint32 MaxObjectCount = 0
           else if (maxObjectCount.get(parser, name, emptyTag))
           {
               maxObjectCount.found(duplicateParameter);
           }
           else if(propertyList.get(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
           }
           else
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMGetQualifierRequestMessage> request(          // generate exception if endtag error or duplicate attributes
         new CIMGetQualifierRequestMessage(          _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // Reject if required parameter does not exist in request
       className.rejectIfNotExist();
   
       AutoPtr<CIMOpenEnumerateInstancesRequestMessage> request(
           new CIMOpenEnumerateInstancesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             qualifierName,              className.value,
               deepInheritance.value,
               includeClassOrigin.value,
               propertyList.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2481 
Line 3854 
     return request.release();     return request.release();
 } }
  
 CIMEnumerateQualifiersRequestMessage*  
     CIMOperationRequestDecoder::decodeEnumerateQualifiersRequest(  CIMOpenEnumerateInstancePathsRequestMessage*
       CIMOperationRequestDecoder::decodeOpenEnumerateInstancePathsRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
         const CIMNamespaceName& nameSpace)         const CIMNamespaceName& nameSpace)
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
   
       // EnumerateInstance Parameters
       classNameIParam className("ClassName");
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
       uint32ArgIParam operationTimeout("OperationTimeout");
   
       Boolean duplicateParameter = false;
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         // No IPARAMVALUEs are defined for this operation          if(className.get(parser, name, emptyTag))
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);          {
               className.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] string FilterQueryLanguage = NULL,
           else if(filterQueryLanguage.get(parser, name, emptyTag))
           {
               filterQueryLanguage.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] string FilterQuery = NULL,
           else if(filterQuery.get(parser, name, emptyTag))
           {
               filterQuery.found(duplicateParameter);
           }
           // [IN,OPTIONAL] Boolean ContinueOnError = false,
           else if (continueOnError.get(parser, name, emptyTag))
           {
               continueOnError.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
           else if (operationTimeout.get(parser, name, emptyTag))
           {
               operationTimeout.found(duplicateParameter);
           }
           // [IN,OPTIONAL] uint32 MaxObjectCount = 0
           else if (maxObjectCount.get(parser, name, emptyTag))
           {
               maxObjectCount.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMEnumerateQualifiersRequestMessage> request(          // generate exception if endtag error or duplicate attributes
         new CIMEnumerateQualifiersRequestMessage(          _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       // Reject if required parameter does not exist in request
       className.rejectIfNotExist();
   
       AutoPtr<CIMOpenEnumerateInstancePathsRequestMessage> request(
           new CIMOpenEnumerateInstancePathsRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
               className.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2509 
Line 3939 
     return request.release();     return request.release();
 } }
  
 CIMDeleteQualifierRequestMessage*  CIMOpenReferenceInstancesRequestMessage*
     CIMOperationRequestDecoder::decodeDeleteQualifierRequest(      CIMOperationRequestDecoder::decodeOpenReferenceInstancesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2518 
Line 3948 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     String qualifierNameString;      objectNameIParam objectName("InstanceName");
     CIMName qualifierName;      classNameIParam resultClass("ResultClass");
       stringIParam role("role", false);
       booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       uint32ArgIParam operationTimeout("OperationTimeout");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotQualifierName = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
   
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "QualifierName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getStringValueElement(parser, qualifierNameString, true);  
             qualifierName = qualifierNameString;  
             duplicateParameter = gotQualifierName;  
             gotQualifierName = true;  
         }         }
         else          else if(role.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              role.found(duplicateParameter);
         }         }
           else if (resultClass.getOptional(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              resultClass.found(duplicateParameter);
         }         }
           else if(includeClassOrigin.get(parser, name,  emptyTag))
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              includeClassOrigin.found(duplicateParameter);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
           else if(propertyList.get(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
     }     }
           // [IN,OPTIONAL,NULL] string FilterQueryLanguage = NULL,
     if (!gotQualifierName)          else if(filterQueryLanguage.get(parser, name, emptyTag))
           {
               filterQueryLanguage.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] string FilterQuery = NULL,
           else if(filterQuery.get(parser, name, emptyTag))
           {
               filterQuery.found(duplicateParameter);
           }
           // [IN,OPTIONAL] Boolean ContinueOnError = false,
           else if (continueOnError.get(parser, name, emptyTag))
           {
               continueOnError.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
           else if (operationTimeout.get(parser, name, emptyTag))
           {
               operationTimeout.found(duplicateParameter);
           }
           // [IN,OPTIONAL] uint32 MaxObjectCount = 0
           else if (maxObjectCount.get(parser, name, emptyTag))
           {
               maxObjectCount.found(duplicateParameter);
           }
           else
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMDeleteQualifierRequestMessage> request(          // generate exception if endtag error or duplicate attributes
         new CIMDeleteQualifierRequestMessage(          _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       objectName.rejectIfNotExist();
   
       AutoPtr<CIMOpenReferenceInstancesRequestMessage> request(
           new CIMOpenReferenceInstancesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             qualifierName,              objectName.value,
               resultClass.value,
               role.value,
               includeClassOrigin.value,
               propertyList.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2569 
Line 4046 
     return request.release();     return request.release();
 } }
  
 CIMReferenceNamesRequestMessage*  
     CIMOperationRequestDecoder::decodeReferenceNamesRequest(  CIMOpenReferenceInstancePathsRequestMessage*
       CIMOperationRequestDecoder::decodeOpenReferenceInstancePathsRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2578 
Line 4056 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath objectName;      objectNameIParam objectName("InstanceName");
     CIMName resultClass;      classNameIParam resultClass("ResultClass");
     String role;      stringIParam role("role", false);
   
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       uint32ArgIParam operationTimeout("OperationTimeout");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotObjectName = false;  
     Boolean gotResultClass = false;  
     Boolean gotRole = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ObjectName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getObjectNameElement(parser, objectName);  
             duplicateParameter = gotObjectName;  
             gotObjectName = true;  
         }         }
         else if (System::strcasecmp(name, "ResultClass") == 0)          else if(role.get(parser, name, emptyTag))
         {  
             //  
             //  ResultClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, resultClass, false);              role.found(duplicateParameter);
             }  
             duplicateParameter = gotResultClass;  
             gotResultClass = true;  
         }         }
         else if (System::strcasecmp(name, "Role") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {         {
             //              resultClass.found(duplicateParameter);
             //  Role may be NULL          }
             //          else if(filterQueryLanguage.get(parser, name, emptyTag))
             if (!emptyTag)  
             {             {
                 XmlReader::getStringValueElement(parser, role, false);              filterQueryLanguage.found(duplicateParameter);
             }             }
             duplicateParameter = gotRole;          else if(filterQuery.get(parser, name, emptyTag))
             gotRole = true;          {
               filterQuery.found(duplicateParameter);
         }         }
         else          else if (continueOnError.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              continueOnError.found(duplicateParameter);
         }         }
           else if (operationTimeout.get(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
            XmlReader::expectEndTag(parser, "IPARAMVALUE");              operationTimeout.found(duplicateParameter);
         }         }
           else if (maxObjectCount.get(parser, name, emptyTag))
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              maxObjectCount.found(duplicateParameter);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     if (!gotObjectName)          // generate exception if endtag error or duplicate attributes
     {          _checkMissingEndTagOrDuplicateParamValue(
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              parser, duplicateParameter, emptyTag);
     }     }
  
     AutoPtr<CIMReferenceNamesRequestMessage> request(      objectName.rejectIfNotExist();
         new CIMReferenceNamesRequestMessage(  
       AutoPtr<CIMOpenReferenceInstancePathsRequestMessage> request(
           new CIMOpenReferenceInstancePathsRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             objectName,              objectName.value,
             resultClass,              resultClass.value,
             role,              role.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2657 
Line 4136 
     return request.release();     return request.release();
 } }
  
 CIMReferencesRequestMessage*  CIMOpenAssociatorInstancesRequestMessage*
     CIMOperationRequestDecoder::decodeReferencesRequest(      CIMOperationRequestDecoder::decodeOpenAssociatorInstancesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2666 
Line 4145 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath objectName;      objectNameIParam objectName("InstanceName");
     CIMName resultClass;      classNameIParam assocClass("AssocClass");
     String role;      classNameIParam resultClass("ResultClass");
     Boolean includeQualifiers = false;      stringIParam resultRole("Resultrole", false);
     Boolean includeClassOrigin = false;      stringIParam role("role", false);
     CIMPropertyList propertyList;      booleanIParam includeClassOrigin("IncludeClassOrigin");
       propertyListIParam propertyList;
   
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       uint32ArgIParam operationTimeout("OperationTimeout");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotObjectName = false;  
     Boolean gotResultClass = false;  
     Boolean gotRole = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ObjectName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getObjectNameElement(parser, objectName);  
             duplicateParameter = gotObjectName;  
             gotObjectName = true;  
         }         }
         else if (System::strcasecmp(name, "ResultClass") == 0)          else if (assocClass.getOptional(parser, name, emptyTag))
         {  
             //  
             //  ResultClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, resultClass, false);              assocClass.found(duplicateParameter);
             }  
             duplicateParameter = gotResultClass;  
             gotResultClass = true;  
         }         }
         else if (System::strcasecmp(name, "Role") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {  
             //  
             //  Role may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getStringValueElement(parser, role, false);              resultClass.found(duplicateParameter);
             }             }
             duplicateParameter = gotRole;          else if(role.get(parser, name, emptyTag))
             gotRole = true;  
         }  
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)  
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              role.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }         }
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)          else if(resultRole.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              resultRole.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);  
             duplicateParameter = gotIncludeClassOrigin;  
             gotIncludeClassOrigin = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          else if(includeClassOrigin.get(parser, name,  emptyTag))
         {  
             if (!emptyTag)  
             {  
                 CIMValue pl;  
                 if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))  
                 {                 {
                     Array<String> propertyListArray;              includeClassOrigin.found(duplicateParameter);
                     pl.get(propertyListArray);  
                     Array<CIMName> cimNameArray;  
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)  
                     {  
                         cimNameArray.append(propertyListArray[i]);  
                     }                     }
                     propertyList.set(cimNameArray);          else if(propertyList.get(parser, name, emptyTag))
           {
               propertyList.found(duplicateParameter);
                 }                 }
           else if(filterQueryLanguage.get(parser, name, emptyTag))
           {
               filterQueryLanguage.found(duplicateParameter);
             }             }
             duplicateParameter = gotPropertyList;          else if(filterQuery.get(parser, name, emptyTag))
             gotPropertyList = true;          {
               filterQuery.found(duplicateParameter);
         }         }
         else          else if (continueOnError.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              continueOnError.found(duplicateParameter);
         }         }
           else if (operationTimeout.get(parser, name, emptyTag))
        if (!emptyTag)  
        {        {
            XmlReader::expectEndTag(parser, "IPARAMVALUE");              operationTimeout.found(duplicateParameter);
        }        }
           else if (maxObjectCount.get(parser, name, emptyTag))
        if (duplicateParameter)  
        {        {
            throw PEGASUS_CIM_EXCEPTION(              maxObjectCount.found(duplicateParameter);
                CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
        }        }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     if (!gotObjectName)          // generate exception if endtag error or duplicate attributes
     {          _checkMissingEndTagOrDuplicateParamValue(
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              parser, duplicateParameter, emptyTag);
     }     }
  
     AutoPtr<CIMReferencesRequestMessage> request(      objectName.rejectIfNotExist();
         new CIMReferencesRequestMessage(  
       AutoPtr<CIMOpenAssociatorInstancesRequestMessage> request(
           new CIMOpenAssociatorInstancesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             objectName,              objectName.value,
             resultClass,              assocClass.value,
             role,              resultClass.value,
             includeQualifiers,              role.value,
             includeClassOrigin,              resultRole.value,
             propertyList,              includeClassOrigin.value,
               propertyList.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2788 
Line 4249 
     return request.release();     return request.release();
 } }
  
 CIMAssociatorNamesRequestMessage*  CIMOpenAssociatorInstancePathsRequestMessage*
     CIMOperationRequestDecoder::decodeAssociatorNamesRequest(      CIMOperationRequestDecoder::decodeOpenAssociatorInstancePathsRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2797 
Line 4258 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath objectName;      objectNameIParam objectName("InstanceName");
     CIMName assocClass;      classNameIParam assocClass("AssocClass");
     CIMName resultClass;      classNameIParam resultClass("ResultClass");
     String role;      stringIParam resultRole("Resultrole", false);
     String resultRole;      stringIParam role("role", false);
   
       stringIParam filterQueryLanguage("FilterQueryLanguage",false);
       stringIParam filterQuery("FilterQuery", false);
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       uint32ArgIParam operationTimeout("OperationTimeout");
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotObjectName = false;  
     Boolean gotAssocClass = false;  
     Boolean gotResultClass = false;  
     Boolean gotRole = false;  
     Boolean gotResultRole = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ObjectName") == 0)          if(objectName.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              objectName.found(duplicateParameter);
             XmlReader::getObjectNameElement(parser, objectName);  
             duplicateParameter = gotObjectName;  
             gotObjectName = true;  
         }         }
         else if (System::strcasecmp(name, "AssocClass") == 0)          else if (assocClass.getOptional(parser, name, emptyTag))
         {  
             //  
             //  AssocClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, assocClass, false);              assocClass.found(duplicateParameter);
             }  
             duplicateParameter = gotAssocClass;  
             gotAssocClass = true;  
         }         }
         else if (System::strcasecmp(name, "ResultClass") == 0)          else if (resultClass.getOptional(parser, name, emptyTag))
         {  
             //  
             //  ResultClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, resultClass, false);              resultClass.found(duplicateParameter);
             }             }
             duplicateParameter = gotResultClass;          else if(role.get(parser, name, emptyTag))
             gotResultClass = true;  
         }  
         else if (System::strcasecmp(name, "Role") == 0)  
         {  
             //  
             //  Role may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getStringValueElement(parser, role, false);              role.found(duplicateParameter);
             }  
             duplicateParameter = gotRole;  
             gotRole = true;  
         }         }
         else if (System::strcasecmp(name, "ResultRole") == 0)          else if(resultRole.get(parser, name, emptyTag))
         {         {
             //              resultRole.found(duplicateParameter);
             //  ResultRole may be NULL          }
             //          else if(filterQueryLanguage.get(parser, name, emptyTag))
             if (!emptyTag)  
             {             {
                 XmlReader::getStringValueElement(parser, resultRole, false);              filterQueryLanguage.found(duplicateParameter);
             }             }
             duplicateParameter = gotResultRole;          else if(filterQuery.get(parser, name, emptyTag))
             gotResultRole = true;          {
               filterQuery.found(duplicateParameter);
         }         }
         else          else if (continueOnError.get(parser, name, emptyTag))
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              continueOnError.found(duplicateParameter);
         }         }
           else if (operationTimeout.get(parser, name, emptyTag))
         if (!emptyTag)  
         {         {
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              operationTimeout.found(duplicateParameter);
         }         }
           else if (maxObjectCount.get(parser, name, emptyTag))
         if (duplicateParameter)  
         {         {
             throw PEGASUS_CIM_EXCEPTION(              maxObjectCount.found(duplicateParameter);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }         }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     if (!gotObjectName)          // generate exception if endtag error or duplicate attributes
     {          _checkMissingEndTagOrDuplicateParamValue(
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);              parser, duplicateParameter, emptyTag);
     }     }
  
     AutoPtr<CIMAssociatorNamesRequestMessage> request(      objectName.rejectIfNotExist();
         new CIMAssociatorNamesRequestMessage(  
       AutoPtr<CIMOpenAssociatorInstancePathsRequestMessage> request(
           new CIMOpenAssociatorInstancePathsRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             objectName,              objectName.value,
             assocClass,              assocClass.value,
             resultClass,              resultClass.value,
             role,              role.value,
             resultRole,              resultRole.value,
               filterQueryLanguage.value,
               filterQuery.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 2906 
Line 4350 
     return request.release();     return request.release();
 } }
  
 CIMAssociatorsRequestMessage*  CIMPullInstancesWithPathRequestMessage*
     CIMOperationRequestDecoder::decodeAssociatorsRequest(      CIMOperationRequestDecoder::decodePullInstancesWithPathRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 2915 
Line 4359 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath objectName;      // enumerationContext parameter. Value Required.
     CIMName assocClass;      //[IN,OUT] <enumerationContext> EnumerationContext,
     CIMName resultClass;      stringIParam enumerationContext("EnumerationContext",  true);
     String role;  
     String resultRole;      // maxObjectCount Parameter, Value Required. The default value is ignored.
     Boolean includeQualifiers = false;      // [IN] uint32 MaxObjectCount
     Boolean includeClassOrigin = false;      uint32IParam maxObjectCount("MaxObjectCount",0, true);
     CIMPropertyList propertyList;  
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotObjectName = false;  
     Boolean gotAssocClass = false;  
     Boolean gotResultClass = false;  
     Boolean gotRole = false;  
     Boolean gotResultRole = false;  
     Boolean gotIncludeQualifiers = false;  
     Boolean gotIncludeClassOrigin = false;  
     Boolean gotPropertyList = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "ObjectName") == 0)         if(enumerationContext.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              enumerationContext.found(duplicateParameter);
             XmlReader::getObjectNameElement(parser, objectName);  
             duplicateParameter = gotObjectName;  
             gotObjectName = true;  
         }         }
         else if (System::strcasecmp(name, "AssocClass") == 0)          else if(maxObjectCount.get(parser, name, emptyTag))
         {  
             //  
             //  AssocClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, assocClass, false);              maxObjectCount.found(duplicateParameter);
             }  
             duplicateParameter = gotAssocClass;  
             gotAssocClass = true;  
         }         }
         else if (System::strcasecmp(name, "ResultClass") == 0)          else
         {  
             //  
             //  ResultClass may be NULL  
             //  
             if (!emptyTag)  
             {             {
                 XmlReader::getClassNameElement(parser, resultClass, false);              _throwCIMExceptionInvalidIParamName(name);
             }  
             duplicateParameter = gotResultClass;  
             gotResultClass = true;  
         }         }
         else if (System::strcasecmp(name, "Role") == 0)  
         {          // generate exception if endtag error or duplicate attributes
             //          _checkMissingEndTagOrDuplicateParamValue(
             //  Role may be NULL              parser, duplicateParameter, emptyTag);
             //  
             if (!emptyTag)  
             {  
                 XmlReader::getStringValueElement(parser, role, false);  
             }             }
             duplicateParameter = gotRole;  
             gotRole = true;      // test to be sure required parameters exist.
       enumerationContext.rejectIfNotExist();
       maxObjectCount.rejectIfNotExist();
   
       AutoPtr<CIMPullInstancesWithPathRequestMessage> request(
           new CIMPullInstancesWithPathRequestMessage(
               messageId,
               nameSpace,
               enumerationContext.value,
               maxObjectCount.value,
               QueueIdStack(queueId, _returnQueueId)));
   
       STAT_SERVERSTART
   
       return request.release();
         }         }
         else if (System::strcasecmp(name, "ResultRole") == 0)  
         {  CIMPullInstancePathsRequestMessage*
             //      CIMOperationRequestDecoder::decodePullInstancePathsRequest(
             //  ResultRole may be NULL          Uint32 queueId,
             //          XmlParser& parser,
             if (!emptyTag)          const String& messageId,
           const CIMNamespaceName& nameSpace)
             {             {
                 XmlReader::getStringValueElement(parser, resultRole, false);      STAT_GETSTARTTIME
             }  
             duplicateParameter = gotResultRole;      // enumerationContext parameter. Value Required.
             gotResultRole = true;      //[IN,OUT] <enumerationContext> EnumerationContext,
         }      stringIParam enumerationContext("EnumerationContext",  true);
         else if (System::strcasecmp(name, "IncludeQualifiers") == 0)  
       // maxObjectCount Parameter, Value Required. The default value is ignored.
       // [IN] uint32 MaxObjectCount
       uint32IParam maxObjectCount("MaxObjectCount",0, true);
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);         if(enumerationContext.get(parser, name, emptyTag))
             XmlReader::getBooleanValueElement(parser, includeQualifiers, true);  
             duplicateParameter = gotIncludeQualifiers;  
             gotIncludeQualifiers = true;  
         }  
         else if (System::strcasecmp(name, "IncludeClassOrigin") == 0)  
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              enumerationContext.found(duplicateParameter);
             XmlReader::getBooleanValueElement(parser, includeClassOrigin, true);  
             duplicateParameter = gotIncludeClassOrigin;  
             gotIncludeClassOrigin = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyList") == 0)          else if(maxObjectCount.get(parser, name, emptyTag))
         {  
             if (!emptyTag)  
             {  
                 CIMValue pl;  
                 if (XmlReader::getValueArrayElement(parser, CIMTYPE_STRING, pl))  
                 {  
                     Array<String> propertyListArray;  
                     pl.get(propertyListArray);  
                     Array<CIMName> cimNameArray;  
                     for (Uint32 i = 0; i < propertyListArray.size(); i++)  
                     {                     {
                         cimNameArray.append(propertyListArray[i]);              maxObjectCount.found(duplicateParameter);
                     }  
                     propertyList.set(cimNameArray);  
                 }  
             }  
             duplicateParameter = gotPropertyList;  
             gotPropertyList = true;  
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }  
   
         if (!emptyTag)  
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotObjectName)      // test to be sure required parameters exist.
     {      enumerationContext.rejectIfNotExist();
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);      maxObjectCount.rejectIfNotExist();
     }  
  
     AutoPtr<CIMAssociatorsRequestMessage> request(      AutoPtr<CIMPullInstancePathsRequestMessage> request(
         new CIMAssociatorsRequestMessage(          new CIMPullInstancePathsRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             objectName,              enumerationContext.value,
             assocClass,              maxObjectCount.value,
             resultClass,  
             role,  
             resultRole,  
             includeQualifiers,  
             includeClassOrigin,  
             propertyList,  
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 3067 
Line 4466 
     return request.release();     return request.release();
 } }
  
 CIMGetPropertyRequestMessage*  CIMPullInstancesRequestMessage*
     CIMOperationRequestDecoder::decodeGetPropertyRequest(      CIMOperationRequestDecoder::decodePullInstancesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 3076 
Line 4475 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath instanceName;      // enumerationContext parameter. Value Required.
     String propertyName;      //[IN,OUT] <enumerationContext> EnumerationContext,
       stringIParam enumerationContext("EnumerationContext",  true);
       // maxObjectCount Parameter, Value Required. The default value is ignored.
       // [IN] uint32 MaxObjectCount
       uint32IParam maxObjectCount("MaxObjectCount",0, true);
   
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotInstanceName = false;  
     Boolean gotPropertyName = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "InstanceName") == 0)         if(enumerationContext.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              enumerationContext.found(duplicateParameter);
             XmlReader::getInstanceNameElement(parser, instanceName);  
             duplicateParameter = gotInstanceName;  
             gotInstanceName = true;  
         }         }
         else if (System::strcasecmp(name, "PropertyName") == 0)          else if(maxObjectCount.get(parser, name, emptyTag))
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);              maxObjectCount.found(duplicateParameter);
             XmlReader::getStringValueElement(parser, propertyName, true);  
             duplicateParameter = gotPropertyName;  
             gotPropertyName = true;  
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (!emptyTag)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              parser, duplicateParameter, emptyTag);
         }  
   
         if (duplicateParameter)  
         {  
             throw PEGASUS_CIM_EXCEPTION(  
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotInstanceName || !gotPropertyName)      // test to be sure required parameters exist.
     {      enumerationContext.rejectIfNotExist();
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);      maxObjectCount.rejectIfNotExist();
     }  
  
     AutoPtr<CIMGetPropertyRequestMessage> request(      AutoPtr<CIMPullInstancesRequestMessage> request(
         new CIMGetPropertyRequestMessage(          new CIMPullInstancesRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             instanceName,              enumerationContext.value,
             propertyName,              maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
   CIMCloseEnumerationRequestMessage*
 CIMSetPropertyRequestMessage*      CIMOperationRequestDecoder::decodeCloseEnumerationRequest(
     CIMOperationRequestDecoder::decodeSetPropertyRequest(  
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
Line 3144 
Line 4531 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMObjectPath instanceName;      String enumerationContext = String::EMPTY;
     String propertyName;  
     CIMValue propertyValue;  
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotInstanceName = false;      Boolean gotEnumerationContext = false;
     Boolean gotPropertyName = false;  
     Boolean gotNewValue = false;  
     Boolean emptyTag;  
  
       Boolean emptyTag;
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "InstanceName") == 0)          if (System::strcasecmp(name, "EnumerationContext") == 0)
         {  
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getInstanceNameElement(parser, instanceName);  
             duplicateParameter = gotInstanceName;  
             gotInstanceName = true;  
         }  
         else if (System::strcasecmp(name, "PropertyName") == 0)  
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getStringValueElement(parser, propertyName, true);              XmlReader::getStringValueElement(parser, enumerationContext, true);
             duplicateParameter = gotPropertyName;              duplicateParameter = gotEnumerationContext;
             gotPropertyName = true;              gotEnumerationContext = true;
         }  
         else if (System::strcasecmp(name, "NewValue") == 0)  
         {  
             if (emptyTag || !XmlReader::getPropertyValue(parser, propertyValue))  
             {  
                 propertyValue.setNullValue(CIMTYPE_STRING, false);  
             }  
             duplicateParameter = gotNewValue;  
             gotNewValue = true;  
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }  
   
         if (!emptyTag)  
         {  
             XmlReader::expectEndTag(parser, "IPARAMVALUE");  
         }         }
  
         if (duplicateParameter)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             throw PEGASUS_CIM_EXCEPTION(              parser, duplicateParameter, emptyTag);
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }     }
  
     if (!gotInstanceName || !gotPropertyName)      if (!gotEnumerationContext)
     {     {
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);          _throwCIMExceptionEnumerationContextRequired();
     }     }
  
     AutoPtr<CIMSetPropertyRequestMessage> request(      AutoPtr<CIMCloseEnumerationRequestMessage> request(
         new CIMSetPropertyRequestMessage(          new CIMCloseEnumerationRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             instanceName,              enumerationContext,
             propertyName,  
             propertyValue,  
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 3215 
Line 4573 
     return request.release();     return request.release();
 } }
  
 CIMExecQueryRequestMessage* CIMOperationRequestDecoder::decodeExecQueryRequest(  // NOTE: We did not update this message to use the new classes because
   // it is deprecated, and not supported by pegasus.
   CIMEnumerationCountRequestMessage*
       CIMOperationRequestDecoder::decodeEnumerationCountRequest(
     Uint32 queueId,     Uint32 queueId,
     XmlParser& parser,     XmlParser& parser,
     const String& messageId,     const String& messageId,
Line 3223 
Line 4584 
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     String queryLanguage;      String enumerationContext = String::EMPTY;
     String query;  
     Boolean duplicateParameter = false;     Boolean duplicateParameter = false;
     Boolean gotQueryLanguage = false;      Boolean gotEnumerationContext = false;
     Boolean gotQuery = false;  
     Boolean emptyTag;     Boolean emptyTag;
  
     for (const char* name;     for (const char* name;
          XmlReader::getIParamValueTag(parser, name, emptyTag); )          XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         if (System::strcasecmp(name, "QueryLanguage") == 0)          if (System::strcasecmp(name, "EnumerationContext") == 0)
         {         {
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);             XmlReader::rejectNullIParamValue(parser, emptyTag, name);
             XmlReader::getStringValueElement(parser, queryLanguage, true);              XmlReader::getStringValueElement(parser, enumerationContext, true);
             duplicateParameter = gotQueryLanguage;              duplicateParameter = gotEnumerationContext;
             gotQueryLanguage = true;              gotEnumerationContext = true;
         }  
         else if (System::strcasecmp(name, "Query") == 0)  
         {  
             XmlReader::rejectNullIParamValue(parser, emptyTag, name);  
             XmlReader::getStringValueElement(parser, query, true);  
             duplicateParameter = gotQuery;  
             gotQuery = true;  
         }         }
         else         else
         {         {
             throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, String::EMPTY);              _throwCIMExceptionInvalidIParamName(name);
         }         }
  
         if (!emptyTag)          // generate exception if endtag error or duplicate attributes
         {          _checkMissingEndTagOrDuplicateParamValue(
             XmlReader::expectEndTag(parser, "IPARAMVALUE");              parser, duplicateParameter, emptyTag);
         }         }
  
         if (duplicateParameter)      if (!gotEnumerationContext)
         {         {
             throw PEGASUS_CIM_EXCEPTION(  
                 CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
         }  
     }  
  
     if (!gotQueryLanguage || !gotQuery)          _throwCIMExceptionEnumerationContextRequired();
     {  
         throw PEGASUS_CIM_EXCEPTION(CIM_ERR_INVALID_PARAMETER, String::EMPTY);  
     }     }
  
     AutoPtr<CIMExecQueryRequestMessage> request(  
         new CIMExecQueryRequestMessage(      AutoPtr<CIMEnumerationCountRequestMessage> request(
           new CIMEnumerationCountRequestMessage(
             messageId,             messageId,
             nameSpace,             nameSpace,
             queryLanguage,              enumerationContext,
             query,  
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
Line 3282 
Line 4629 
     return request.release();     return request.release();
 } }
  
 CIMInvokeMethodRequestMessage*  CIMOpenQueryInstancesRequestMessage*
     CIMOperationRequestDecoder::decodeInvokeMethodRequest(      CIMOperationRequestDecoder::decodeOpenQueryInstancesRequest(
         Uint32 queueId,         Uint32 queueId,
         XmlParser& parser,         XmlParser& parser,
         const String& messageId,         const String& messageId,
         const CIMObjectPath& reference,          const CIMNamespaceName& nameSpace)
         const String& cimMethodName)  
 { {
     STAT_GETSTARTTIME     STAT_GETSTARTTIME
  
     CIMParamValue paramValue;      stringIParam filterQueryLanguage("FilterQueryLanguage",true);
     Array<CIMParamValue> inParameters;      stringIParam filterQuery("FilterQuery", true);
  
     while (XmlReader::getParamValueElement(parser, paramValue))      booleanIParam returnQueryResultClass("ReturnQueryResultClass");
       booleanIParam continueOnError("ContinueOnError");
       // [IN,OPTIONAL] uint32 MaxObjectCount = 0
       uint32IParam maxObjectCount("MaxObjectCount", 0);
       // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
       uint32ArgIParam operationTimeout("OperationTimeout");
   
       Boolean duplicateParameter = false;
       Boolean emptyTag;
   
       for (const char* name;
            XmlReader::getIParamValueTag(parser, name, emptyTag); )
     {     {
         inParameters.append(paramValue);          // [IN,OPTIONAL,NULL] string FilterQueryLanguage = NULL,
           if(filterQueryLanguage.get(parser, name, emptyTag))
           {
               filterQueryLanguage.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] string FilterQuery = NULL,
           else if(filterQuery.get(parser, name, emptyTag))
           {
               filterQuery.found(duplicateParameter);
           }
           else if (returnQueryResultClass.get(parser, name, emptyTag))
           {
               returnQueryResultClass.found(duplicateParameter);
           }
           // [IN,OPTIONAL] Boolean ContinueOnError = false,
           else if (continueOnError.get(parser, name, emptyTag))
           {
               continueOnError.found(duplicateParameter);
           }
           // [IN,OPTIONAL,NULL] uint32 OperationTimeout = NULL,
           else if (operationTimeout.get(parser, name, emptyTag))
           {
               operationTimeout.found(duplicateParameter);
           }
           // [IN,OPTIONAL] uint32 MaxObjectCount = 0
           else if (maxObjectCount.get(parser, name, emptyTag))
           {
               maxObjectCount.found(duplicateParameter);
           }
           else
           {
               _throwCIMExceptionInvalidIParamName(name);
     }     }
  
     AutoPtr<CIMInvokeMethodRequestMessage> request(          // generate exception if endtag error or duplicate attributes
         new CIMInvokeMethodRequestMessage(          _checkMissingEndTagOrDuplicateParamValue(
               parser, duplicateParameter, emptyTag);
       }
   
       _testRequiredParametersExist(filterQuery.value,filterQuery.got);
       _testRequiredParametersExist(filterQuery.value,filterQueryLanguage.got);
   
       AutoPtr<CIMOpenQueryInstancesRequestMessage> request(
           new CIMOpenQueryInstancesRequestMessage(
             messageId,             messageId,
             reference.getNameSpace(),              nameSpace,
             reference,              filterQueryLanguage.value,
             cimMethodName,              filterQuery.value,
             inParameters,              returnQueryResultClass.value,
               operationTimeout.value,
               continueOnError.value,
               maxObjectCount.value,
             QueueIdStack(queueId, _returnQueueId)));             QueueIdStack(queueId, _returnQueueId)));
  
     STAT_SERVERSTART     STAT_SERVERSTART
  
     return request.release();     return request.release();
 } }
   //EXP_PULL_END
  
 void CIMOperationRequestDecoder::setServerTerminating(Boolean flag) void CIMOperationRequestDecoder::setServerTerminating(Boolean flag)
 { {


Legend:
Removed from v.1.127  
changed lines
  Added in v.1.127.2.20

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2