[Quickfix-developers] fwd: How to make a TestRequest and get Response
Brought to you by:
orenmnero
From: Ramprakash U. <ram...@ca...> - 2004-06-07 13:54:50
|
=20 -----Original Message----- From: Ramprakash Umapathy [mailto:Ram...@ca...]=20 Sent: luned=EC 7 giugno 2004 15:43 To: 'Oren Miller' Subject: How to make a TestRequest and get Response Hi, =20 I'm trying to make a Test Request in test code and try to collect the response. The code is in VB.NET with QuickFix 1.3.6=20 =20 Please correct me if I'm anything wrong with this approach =20 I write a method in my QuickFix.Application implementation class like = this, =20 Public Sub GenerateTestRequest() Try Dim QFTest As New QuickFix42.TestRequest(New = QuickFix.TestReqID("TEST MESSAGE")) Session.sendToTarget(QFTest, "umapar1a", "s09183") Catch ex As System.Exception Throw (ex) End Try End Sub=20 And then collect the Response from the Server like this in FromAdmin of QuickFix.Application implementation class Public Sub fromAdmin(ByVal QFmessage As QuickFix.Message, ByVal = QFSession As QuickFix.SessionID) Implements QuickFix.Application.fromAdmin If (QFmessage.getHeader.getField(35) =3D "0") Then=20 If QFmessage.isSetField(112) Then If QFMessage.getField(112) =3D "TEST MESSAGE") Then MsgBox "TEST Request Succeeded" =20 End If End If End If End Sub=20 Now my Questions are, 1) Is this approach is right or is there any other better way of doing = it. 2) Why I get QFMessage.getField(112) get a compilation error? (Error is 'getField' has a return type that is not supported or = parameter types that are not supported.) Thanks in Advance, Ramprakash =20 =20 |