private bool SOAPReceiver_OnMessageReceived(SOAPReceiverSession session) { if (_controler.ProcessSoapSession(session, MessageDispatchModel.Test, null)) { this.Invoke( new UpdateListHandler(delegate(SOAPReceiverSession s) { UpdateList(s); }), new object[] { session }); return(true); } else { return(false); } }
private void UpdateList(SOAPReceiverSession session) { ListViewItem item = new ListViewItem(session.SessionID.ToString()); item.SubItems.Add(session.ThreadID.ToString()); item.SubItems.Add(session.GetTimeSpanMS()); item.SubItems.Add(session.IncomingMessageDispatchingKey); item.SubItems.Add(session.GetStatusLog()); item.Tag = session; this.listViewMessage.Items.Add(item); if (this.listViewMessage.Items.Count == 1) { this.listViewMessage.Items[0].Selected = true; } }
private void DisplaySession() { if (this.listViewMessage.SelectedItems.Count < 1) { return; } SOAPReceiverSession session = this.listViewMessage.SelectedItems[0].Tag as SOAPReceiverSession; if (session == null) { return; } _ctrlRcvSoap.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + session.IncomingSOAPEnvelope); _ctrlRcvMsg.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + session.IncomingMessageXml); _ctrlSndMsg.Open((session.OutgoingMessage == null) ? "" : "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + session.OutgoingMessage.ToXMLString()); _ctrlSndSoap.Open("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + session.OutgoingSOAPEnvelope); }