Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • RFA /
avatar image
Question by Atilla · Feb 15, 2017 at 09:36 AM · rfa dotnet

OMMConsumer::registerClient() has been called with an item request prior to login request

Hi,

I'm just starting to go through RFA tutorials and trying to get the example there working but stuck on an error. I haven't changed the example much apart from username, service name etc.

In RDMExample.cs

long handle = ommConsumer.RegisterClient(eventQueue, ommItemIntSpec, rdmClient, itemName);

on this line I keep getting

"OMMConsumer::registerClient() has been called with an item request prior to login request. Login request is expected first."

But login was successful above already...

Any idea?

Atilla

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

9 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Feb 15, 2017 at 12:40 PM

Ok - the login failed. Excellent - now we can get somewhere :)

Did you specify your IP address as part of the Login Position e.g.

private static readonly RFA_String UserName = new RFA_String("Atilla.Gurbuz");
private static readonly RFA_String AppId = new RFA_String("256");
private static readonly RFA_String Position = new RFA_String("10.34.21.74");

This should be done near the top of the file in RDMExample.cs

Obviously, you should use your correct username and IP address above.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Feb 15, 2017 at 09:40 AM

Hi,

You say the Login was successful; by this do you mean

a) the registerClient call for the Login successfully returned a handle OR

b) you actually see a Login success response message event back from the server?

Please attach the console output and any .log file generated by the application here, so we can advise further.

Just because the registerClient call for the Login succeeds does not mean you are yet logged into the server successfully. The server will respond asynchronously once it actually accepts your login request. The message you are seeing could suggest the Server denied the login attempt but the application still tried to register a client for Market item request.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by Atilla · Feb 15, 2017 at 09:51 AM

Thanks for quick respond, this is the login line

loginHandle = ommConsumer.RegisterClient(eventQueue, ommItemIntSpec, rdmClient, null);

loginHandle =461216368 which is succeful right?

2017-02-15-14-48-02-clipboard.png


2017-02-15-14-48-02-clipboard.png (47.2 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Feb 15, 2017 at 10:08 AM

As stated in my earlier reply, all the above loginHandle response means is that you successfully registered a client class to receive any callback events generated as a result of your Login request.

It does NOT mean that you have successfully connected and logged into the server etc. Indeed the screenshot you attached does not appear indicate any such successful connection or login.

Which step of the tutorial are you running? I am guessing it is at least Step 4. If this is the case, you should refer to the Video and notes which explain how you register your callback client to receive the callback events and how the client should then receive success or failure response events from the server.

Also, if there is a log file generated in the working folder attach this to your reply - using the Insert File button.

Finally, have you confirmed with your local Market Data admin team that you have the right server and username login details etc?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by Atilla · Feb 15, 2017 at 10:32 AM

Hi, in another application I could read data from TREP with my username, have been going through this tutorial to learn more about RFA, finished all the steps. How do we check if the login is successful or not then? Couldn't find video section you've mentioned. Many thanks.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Feb 15, 2017 at 11:26 AM

When you mentioned RFA .NET and Tutorials I assumed you were looking at these tutorials on this website

https://developers.thomsonreuters.com/thomson-reuters-enterprise-platform/robust-foundation-api-rfa-1/learning?content=3135&type=learning_material_item

Which Tutorials are you running? And do they not generate a LOG file in the runtime folder?

As for a successful login, you should receive an event callback , so in the tutorial code there should be something like:

private void ProcessRespMsg(OMMItemEvent evnt, RespMsg respMsg) {
		//----------------------------------
			switch (respMsg.MsgModelType) {
				case ThomsonReuters.RFA.RDM.RDM.MESSAGE_MODEL_TYPES.MMT_LOGIN:
					ProcessLoginResponse(evnt, respMsg);

The above would get called when a RespMsg is received of model type MMT_LOGIN

The ProcessLoginResponse then checks the RespMsg to see if the login was successful

//----------------------------------
		private void ProcessLoginResponse(OMMItemEvent evnt, RespMsg respMsg) {
		//----------------------------------
			RespStatus status = respMsg.RespStatus;
			RFA_String text = OMMStrings.RespStatusToString(status);


			//For a Login Response examine the stream state and data state:
			//If stream state is open and data state is OK then we have a successful Login
			//If stream state is open and data state is NOT OK then we have a pending Login
			switch (respMsg.RespType) {
				case RespMsg.RespTypeEnum.Refresh:
				case RespMsg.RespTypeEnum.Status:
					if ((respMsg.HintMask & RespMsg.HintMaskFlag.RespStatus) != 0) {
						if ((status.StreamState == RespStatus.StreamStateEnum.Open) &&
							(status.DataState == RespStatus.DataStateEnum.Ok)) {
							AppUtil.Log(AppUtil.LEVEL.INFO, string.Format("<- Received MMT_LOGIN - Login Accepted{0}", text.ToString()));
							ProcessLoginSuccess();
						} 

The tutorial app should then output some information such as:

2017/02/15 16:24:39.950 INFO
    <- Received MMT_LOGIN - Login Accepted
    streamState : Open
    dataState   : Ok
    statusCode  : None
    statusText  : Login accepted by host centos7-1.

To indicate success.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by Atilla · Feb 15, 2017 at 12:02 PM

Thanks Umer, I'm following that tutorial, I know there is mentioning of that method but in the code, ProcessRespMsg within RDMClient, ultimatly get called by public ProcessEvent method within same library but this one is not called anywhere, so ProcessRespMsg doesn't get hit at all?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by Atilla · Feb 15, 2017 at 12:20 PM

Ok you are right, no login, do you have any idea why it could be? Works on another application. Thanks.

2017-02-15-14-48-02-clipboard.png


2017-02-15-14-48-02-clipboard.png (46.7 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by umer.nalla · Feb 15, 2017 at 12:32 PM

Hi,

Not sure which step of the tutorial you are looking at, but I checked Step6 and Step7 code and both of them have routes to call the ProcessRespMsg

ProcessEvent ->( EventType=OMMItemEvent) -> ProcessOMMItemEvent -> ( MsgType= RespMsg) -> ProcessRespMsg

To be honest, we could go back and forth here. But until we have something more to go in terms of diagnostics, I suspect we are not going to get far. If you unable to post the .log file here and you are a TR customer, then I recommend you contact our Developer Support team offline and they may be able to assist.

If you are able to attach the log files then do so - it may help.

Also, I would recommend you add the following line to your config file and re-run your app

\Connections\Connection_RSSL\traceMsgToFile = true

This should generate an .xml trace file in your working directory - please post that here OR include it when you contact our Developer Support team at http://my.thomsonreuters.com/ContactUsNew

Based on past experience, the most likely cause of the error (you reported in the original post) is due to invalid login details or if an application using your userId is already logged in from a different position - but this will be difficult to confirm without log or trace files etc.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
7 People are following this question.

Related Questions

how to get full order book (10 buy + 10 sell)

RFASimpleInsert Example : Difference between RespTypeEnum.Refresh and RespTypeEnum.Update in PostMsg payload

cannot receive 'PRC_TICK', cannot build order book from L2 data

RFA and our TREP capabilities

PauseAll and ResumeAll has no effect

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges