|
[C#] | |
String
GetComments
(String QueueObjID, String QueueItemID)
|
|
QueueObjID |
Queue Object ID |
QueueItemID |
Queue Item ID |
|
Returns Queue Item Comments |
|
| //Create personalizer object and Session object |
| PersonalizerRef.Personalizer pers = new PersonalizerRef.Personalizer()
; |
| SessionRef.Session sess = new SessionRef.Session()
; |
| string SessionID = ""; |
| try{ |
| SessionID = pers.CreateSession("LogonName", "Password"); |
| //Create Fax notification object |
| FaxRef.Fax objFax = new FaxRef.Fax()
; |
| // Create server notification object |
| string FaxNotifID = sess.CreateFaxNotification(SessionID); |
| //Put Text to fax in the queue and get queue item ID |
| string sQueueItemId; |
| sQueueItemId = objFax.EnqueueTextDocument(FaxNotifID, |
| "11005118196", "This is a simple fax notification text"); |
| //Retrieve Status of enqueued fax document |
| QueueRef.Queue oQueue = new QueueRef.Queue()
; |
| string sQueueId = sess.GetQueue(SessionID); |
| while( oQueue.GetItemStatus(sQueueId, sQueueItemId)
!="Done"){ |
| //--- Do pause here or print some messages --- |
| } |
| //Print comments of transmitted document |
| string sComment = oQueue.GetComments(sQueueId, sQueueItemId); |
| objFax.Release(FaxNotifID); |
| sess.Release(SessionID); |
| } |
| catch(Exception e){ |
| //Print exception message e.Message |
| sess.Release(SessionID); |
| } |