Re: Indication with OperationContext Object failed (in Pegasus 2.9.1)

Venkateswara R Puvvada <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <OF1198263F.3227D1B7-ON6525772A.002203A3-6525772A.0022F651@in.ibm.com>
Manjunath,

If the indication provider sets SubscriptionInstanceNamesContainer in the 
operation context, the subset of subscriptions  specified by the 
indication provider should be part of the actual matched subscriptions for 
the indication. Any subscription included by the provider but not 
containing in the matched subscriptions list is ignored. In your case, the 
subscription name you have specified in the provider does not seem to be 
in the actual subscriptions matched for the indication.

Venkat




"Manjunath Marlabeeti" <[email protected]> 
19/05/2010 18:07

To
<[email protected]>
cc

Subject
Indication with OperationContext Object failed  (in Pegasus 2.9.1)






Hi,
 
I have written a simple indication provider it sends the indications to 
java client. 
While execution I observed one thing that in the below function if I 
deliver the indication without context object then the indications are 
received by the java client.
If I deliver with OperationContext object then indications are not 
received by the Java client. But my requirement is indications needs to 
send with OperationContext object.
Here I am copying the function
 
Here is the function call 
GenerateIndication(_handler,CIMName("CRM_Indication"
),objBackInd,strObject,"1.1.1.1","1","1.1.1.1|1|1@");
//objBackInd is an indication object 
 
void GenerateIndication(IndicationResponseHandler *ptrObjHandler, const 
CIMName objMethodName,CIMInstance objBackInd,string &strObject,string 
IP,string ID,string operationID)
{
      char buffer[32];
      sprintf(buffer, "%d", G_ui32NextUid++);
      objBackInd.addProperty(CIMProperty ("IndicationIdentifier"
,String(buffer)));
      char stringTime[MAX_CHARS];
      time_t currentTime=time(NULL);
      sprintf(stringTime,"%ld",currentTime);
      AddProperty("IndicationTime",stringTime,CMC_STRING,strObject);
      CIMIndication cimIndication (objBackInd);
      String filterString;
      string temp;
 
      Array <CIMObjectPath> subscriptionInstanceNames;
      Array <CIMKeyBinding> subscriptionKeyBindings;
      string filterConstruction=
"root/PG_InterOp:CIM_IndicationFilter.CreationClassName=\"CIM_IndicationFilter\",Name=\"Filter20"
;
      filterConstruction=filterConstruction+IP+ID+operationID+
"\",SystemCreationClassName=\"";
      filterString.append(filterConstruction.c_str());
      filterString.append (System::getSystemCreationClassName ());
      filterString.append ("\",SystemName=\"");
      filterString.append (System::getFullyQualifiedHostName ());
      filterString.append ("\"");
      subscriptionKeyBindings.append (CIMKeyBinding ("Filter"
,filterString, CIMKeyBinding::REFERENCE));
      temp = filterString.getCString();
      printf("\nfilterString  %s\n",temp.c_str());
 
      string HandlerConstruction=
"root/PG_InterOp:CIM_IndicationHandlerCIMXML.CreationClassName=\"CIM_IndicationHandlerCIMXML\",Name=\"Handler20"
;
 
      HandlerConstruction     =     HandlerConstruction     + IP 
+ID+operationID+"\",SystemCreationClassName=\"";
                  String handlerString;
                  handlerString.append(HandlerConstruction.c_str());
                  handlerString.append (System::getSystemCreationClassName 
());
                  handlerString.append ("\",SystemName=\"");
                  handlerString.append (System::getFullyQualifiedHostName 
());
                  handlerString.append ("\"");
                  subscriptionKeyBindings.append (CIMKeyBinding ("Handler"
, handlerString, CIMKeyBinding::REFERENCE));
                  temp=handlerString.getCString();
             printf("\nHandlerString  %s\n",temp.c_str());
                CIMObjectPath subscriptionPath ("",
                      CIMNamespaceName ("root/PG_InterOp"),
                      CIMName ("CIM_IndicationSubscription"),
                      subscriptionKeyBindings);
                              subscriptionInstanceNames.append 
(subscriptionPath);
 
            OperationContext context;
                  context.insert (SubscriptionInstanceNamesContainer
                      (subscriptionInstanceNames));
                      objBackInd.addProperty
                                          (CIMProperty ("IpAddress"
,String(IP.c_str())));
                                          objBackInd.addProperty
                                          (CIMProperty ("OperationId"
,String(operationID.c_str())));
                                          objBackInd.addProperty
                                          (CIMProperty ("Uid"
,String(ID.c_str())));
//with Context object indications are not getting received by JAVA clien 
without Context java client is reciving indication
 
      //ptrObjHandler->deliver (objBackInd); 
      ptrObjHandler->deliver (context, objBackInd);
}
 
Please can anyone correct me where exactly I am doing wrong. 
 
Thanks,
Manjunath.M
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.