The Definition of map class STAF/Service/Queue/Entry (which is the list entry type of a QUEUE LIST request) in the STAF User's Guide at http://staf.sourceforge.net/current/STAFUG.htm#HDRQUEUESRV shows that the type is <String> for the "handle" and "handleName" fields.
So, the handle number is stored as a string in the Queue Entry map class (not a STAFHandlePtr). So, you need to do: static STAFString handle_sender; handle_sender = logRecord->get("handle")->asString(); Table 75. Definition of map class STAF/Service/Queue/Entry Description: This map class represents a queued message. Key Name Display Name Type Format / Value priority Priority <String> timestamp Date-Time <String> <YYYYMMDD-HH:MM:SS> machine Machine <String> handleName Handle Name <String> | <None> handle Handle <String> type Type <String> | <None> message Message <Any> Private data will be masked. -------------------------------------------------------------- Sharon Lucas IBM Austin, luc...@us.ibm.com (512) 286-7313 or Tieline 363-7313 From: "Dedhia, Hardik" <hardik.ded...@netapp.com> To: <staf-users@lists.sourceforge.net>, Sharon Lucas/Austin/IBM@IBMUS Date: 07/28/2011 10:39 AM Subject: [staf-users] Acquiring STAFHandle from queued message Hi, I’m trying to get the machine name and handle number and name from the message received. I’m using the following code: static STAFString machine_from; static STAFHandlePtr handle_sender; … machine_from = logRecord->get("machine")->asString(); handle_sender = logRecord->get("handle"); // This line gives me the error – error: no match for âoperator=â in âhandle_sender = STAFObject::get(const STAFString&)(((const STAFString&)(& STAFString(((const char*)"handle"), 4294967295u, kCurrent))))â /usr/software/test/staf/current/include/STAFRefPtr.h:140: note: candidates are: STAFRefPtr<TheType>& STAFRefPtr<TheType>::operator=(const STAFRefPtr<TheType>&) [with TheType = STAFHandle] /usr/software/test/staf/current/include/STAFRefPtr.h:90: note: STAFRefPtr<TheType>& STAFRefPtr<TheType>::operator=(const TheType*) [with TheType = STAFHandle] I also tried to obtain the handle name but similar error persists. Thanks, Hardik. ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users
<<image/gif>>
------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users