question

Upvotes
Accepted
16 3 1 6

Contribution fails to RIC in a Container/BU on ATS

Hi,

I have downloaded the example RFASimpleInsert (.NET). It works fine when I contribute to a RIC on an ATS.

But when I contribute to a RIC on ATS, which setup as BU (Business Unit) and Container I get the message

//-----------------------------------------------------------------------------------------

Text : A29: Post message did not contain permission data.

NackCode : AccessDenied

-----------------------------------------------------------------------------------------//

Of course I contribute to the FID "PROD_PERM".

//-------------------------------------------------------------------------------------------------------------

recordInsertFormat.AddItem(newRFA_String("PROD_PERM"), newRFA_String("11"));

recordInsertFormat.AddItem(newRFA_String("BID"), newRFA_String("11.01"));

-------------------------------------------------------------------------------------------------------------//

In Excel it works with any problem.

Does anybody have a hint for me ?

Thanks and regards,

@THUANTRU.HANG

treprfarfa-api
icon clock
10 |1500

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

Upvote
Accepted
23k 22 9 14

Hello @THUANTRU.HANG,

Please consult with your market data team, that administers ATS, as a Business Unit defined within your ATS, likely has additional permissioning requirements, the contributing user needs to have (PPE value = contribution permission entity for contribution), which they would be able to confirm.

icon clock
10 |1500

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

Upvotes
11.3k 25 8 13

Hello @THUANTRU.HANG,

From the error, it seems that PermissionData is required in the PostMsg. You can use DACSLOCK API to create DACS Lock for the PermissionData. The DACSLOCK API (i.e.

DACS8_lock_NET140_x64.dll) is provided in RFA .Net Package. A DACS Lock typically consists of a service ID, a list of Permission Expressions (PEs), and an operator enumeration that indicates whether authorization is required for any one or all of the PEs.

Below is the sample code for service ID: 267 and PE value: 11.

// Permission data may be included in the PostMsg for the user to be permissioned to post
// information, using the PostMsg.PermissionData property.
int serviceId = 267;
int peOperator = DACS.AuthorizationLock.OperatorEnum.OR;
List<uint> peList = new List<uint>();
peList.Add(11);
ThomsonReuters.RFA.Common.Buffer buffer = new ThomsonReuters.RFA.Common.Buffer();
DACS.AuthorizationLock authLock = new DACS.AuthorizationLock(serviceId, peOperator, peList);
DACS.AuthorizationLockData lockData = new DACS.AuthorizationLockData();
DACS.AuthorizationLockStatus retStatus = new DACS.AuthorizationLockStatus();
DACS.AuthorizationLockData.LockResultEnum result = authLock.GetLock(lockData, retStatus);
if (result != DACS.AuthorizationLockData.LockResultEnum.LOCK_SUCCESS)
{
    authLock.Dispose();
}
byte[] c_LockData = lockData.LockData;
int c_LockDataSize = lockData.Size;
buffer.SetFrom(c_LockData, c_LockDataSize, c_LockDataSize);
postMsg.PermissionData = buffer;
icon clock
10 |1500

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

Upvotes
16 3 1 6

@zoya.farberov

thanks for the quick help.

It works as your advice.

Thanks and regard

@THUANTRU.HANG

icon clock
10 |1500

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

Upvotes
16 3 1 6

Hi @zoya.farberov,

may you please give me a hint why Insert_Update() in the example does not work.

I get

----------------------------------------------------------------------------------

Insert Failed

Text : [502]: Unknown Fid

NackCode : DeniedBySrc

----------------------------------------------------------------------------------

I have tried

recordInsertFormat.AddItem(22, newRFA_String("2.01"));

then

recordInsertFormat.AddItem(new RFA_String("BID"), new RFA_String("11.21"));

----------------------------------------------------------------------------------

but the result is the same.

Inser_Image() works fine.

The RIC has default PPE.

public void Insert_Update()

{

PostMsg postMsg = newPostMsg();

postMsg.MsgModelType = RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE;

postMsg.IndicationMask = PostMsg.IndicationMaskFlag.MessageInit | PostMsg.IndicationMaskFlag.MessageComplete | PostMsg.IndicationMaskFlag.WantAck;

AttribInfo attribInfo = newAttribInfo();

attribInfo.NameType = RDM.INSTRUMENT_NAME_TYPES.INSTRUMENT_NAME_RIC;

attribInfo.ServiceName = Insert_ServiceName;

attribInfo.Name = Insert_ItemName;

postMsg.AttribInfo = attribInfo;

postMsg.PostID = postID;

postID++;

RespMsg respMsg = newRespMsg();

respMsg.MsgModelType = RDM.MESSAGE_MODEL_TYPES.MMT_MARKET_PRICE;

respMsg.RespType = RespMsg.RespTypeEnum.Update;

respMsg.AttribInfo = attribInfo;

recordInsertFormat.AddItem(22, newRFA_String("2.01"));

// recordInsertFormat.AddItem(new RFA_String("BID"), new RFA_String("11.21"));

.........

}

Regards,
Tru

icon clock
10 |1500

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

Upvotes
23k 22 9 14

I think this has to do with how you encode the fid. I would use OMMEncoder from RFA package, i.e. something like

// - Payload : Field List - Start //
_postOMMEncoder.encodeFieldListInit(OMMFieldList.HAS_STANDARD_DATA, (short)0,
                                                    (short)1, (short)0);

_postOMMEncoder.encodeFieldEntryInit((short)22, OMMTypes.REAL);

_postOMMEncoder.encodeFieldEntryInit((short)32, OMMTypes.REAL);
_postOMMEncoder.encodeReal(400, OMMNumeric.EXPONENT_0);

But to save time, I would like to suggest two alternative approaches:

For a new application, consider posting from EMA. It's less code, quicker to get working, and we have great artcile on the dev portal, explaining how to do it with code.

RFA developer kit comes with postingConsumer. I would test against your ATS with this consumer first. Once it works, compare with your custom code for any differences.

Hope this helps,

-Zoya

icon clock
10 |1500

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

Upvotes
16 3 1 6

Hello @zoya.farberov,

thanks for your hint.

It was my mistake. The way to encode the fid was correct. Due to some problems I had before, I have commented out the assignment of the encoded buffer to the Payload, so that Payload were empty. Now it works fine.

Regards,
Tru

icon clock
10 |1500

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

Click below to post an Idea Post Idea