API Support Forum
OEC API > API Support > Contracts and Subscriptions
Author Topic: Contracts and Subscriptions
(7 messages, Page 1 of 1)
Moderators: VPfau
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jul 10, 2012 @ 04:40 PM             Msg. 1 of 7
Hi,

When I login into sim environment, I already have some contracts and some subscriptions, even If I don't ask for them.

My code is as follows:

oecClient = new OECClient();
oecClient.OnLoginComplete += new OnLoginCompleteEvent(OECClient_OnLoginComplete);
oecClient.Connect(domain, 9200, user, pws, false);
...


Into OECClient_OnLoginComplete method, at first line I can see that:
oecClient.Contracts property has 11 contracts, I didn't ask for them previously, with oecClient.RequestContracts(bc) method.
This contracts are: CN2, CZ2, DAZ3, ESU2, ODAZ3 P16, OZCZ2 C0.8, RLM-MU2, RLM-MZ2, RLM-MH3, ZCN2, ZCZ2
I'm not interested in those contracts.
Why does my OECClient object already have those contracts into its Contracts list property?

Also, in same line, (first one into OECClient_OnLoginComplete method), the oecClient.Subscriptions property already have one suscription, to ESU2 contract.
Why does my OECClient object already have that subscription?
I'm not interested in that contract at all.
If I try to unsuscribe from ESU2 contract, I just cannot, I have no exceptions, but into oecClient.Subscriptions list there is still one suscription (to ESU2 contract). I didn't suscribe to that contract at any time, not a single occasion.

Is there a way in wich I can get a OECClient object completly clean? with no contracts, no suscriptions preloaded?

Thanks in advance

Claudia Zendejas
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 11, 2012 @ 10:54 AM             Msg. 2 of 7
What username did you use?

Victor Vins
Lead Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jul 11, 2012 @ 01:03 PM             Msg. 3 of 7
Hi,

I was using username "AAlonso", but yesterday I couldn't using it anymore, because OEC was asking me for a UUID, then I received an email with a valid UUID but for "api.openecry.com" environment, It did work fine, the thing is I cannot connect to sim or prod environments until I have valid UUIDs.

I was trying to test my app with my username CZendejas116 into api.openecry.com, but oecClient.BaseContracts list is empty, so now I can't do no more that just perform login.

Why oecClient.BaseContracts list is empty with a connection to api environment?

Thanks in advance

Claudia Zendejas
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 11, 2012 @ 01:11 PM             Msg. 4 of 7
CZendejas116 had no active accounts. Please try to connect again.

Victor Vins
Lead Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jul 11, 2012 @ 01:54 PM             Msg. 5 of 7
Hi,

Now it's working, oecClient.BaseContracts it is filled, and my code can continue working.
But, just after OECClient_OnLoginComplete method executes, oecClient.Contracts has 3 elements (contracts: RLM-MU2, RLM-MZ2, RLM-MH3). Why is that? I did not ask for any contracts yet.

oecClient.Subscriptions is empty, as expected.

Thanks in advance

Claudia Zendejas
VictorV
Posts: 746
Joined: May 08, 2007


Posted: Jul 11, 2012 @ 01:56 PM             Msg. 6 of 7
We are working on removing these RLM-M contracts from initial load.

Victor Vins
Lead Software Developer
CZendejas116
Posts: 51
Joined: Apr 13, 2011


Posted: Jul 11, 2012 @ 01:59 PM             Msg. 7 of 7
OK, thanks. I'll be on the lookout.

Claudia Zendejas