| | //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 |
| | //Let suppose you have put fax document in the queue and got queue item ID |
| | string sQueueItemId = "18d7f93b476fa98726"; |
| | //Retrieve Status of enqueued fax document |
| | QueueRef.Queue oQueue = new QueueRef.Queue()
; |
| | string sQueueId = sess.GetQueue(SessionID); |
| | if( oQueue.GetItemStatus(sQueueId, sQueueItemId)
=="Waiting"){ |
| | //--- if document still in Waiting status then remove it form the queue --- |
| | if( oQueue.RemoveItem(sQueueId, sQueueItemId)){ |
| | //Do something if item is successfully removed |
| | }else{ |
| | //Do something if item removing failed |
| | } |
| | } |
| | objFax.Release(FaxNotifID); |
| | sess.Release(SessionID); |
| | } |
| | catch(Exception e){ |
| | //Print exception message e.Message |
| | sess.Release(SessionID); |
| | } |