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

"Manjunath Marlabeeti" <[email protected]>
Newsgroups gmane.network.open-pegasus.general
Message-ID <[email protected]>
Please can anyone help me out.

 

From: Manjunath Marlabeeti [mailto:[email protected]] 
Sent: Wednesday, May 19, 2010 6:08 PM
To: [email protected]
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,strObje
ct,"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.CreationClassNa
me=\"CIM_IndicationFilter\",Name=\"Filter20";

 
filterConstruction=filterConstruction+IP+ID+operationID+"\",SystemCreati
onClassName=\"";

      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.Creatio
nClassName=\"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.