question

Upvotes
Accepted
401 22 26 35

How to get ServiceID from a Service Name

Can anyone tell me how to get the Service ID from a Service Name to allow me to create a CBE Lock? This question is for OMM and Market Feed.

I'm currently getting this from OPEN DACS but that seems a bit of overkill! My App knows its service Name but this needs to be converted to ID to allow setting the CBE locks.

rfaDACSopen-dacs
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvote
Accepted
791 11 16 20

I don't think a Provider application has access to this information per se. (neither a SSL Publisher nor an OMM Provider app)

As I see it you need to any of the following

(1) Use the DACS classes to obtain the service id for your own service. This is what you currently do, you say. This requires that the API can establish a connection to a DACS daemon.

or

(2) Who knows, perhaps this information can be retrieved via DACS's web service API ? You'll probably consider such a method just as much overkill as your current solution.

or

(3) In your Provider app first create a mini-consumer OMM app that will connect to the infra and request DIRECTORY. From the message coming back it can tell the relationship between Service Id and Service Name. Again, you'll probably consider this solution to be just as much overkill as the one you're currently using. The only benefit of this solution is that it doesn't require a connection to DACS daemon, only to an ADS.

But I guess the big question to ask yourself is this: Why can't this be part of your Provider app's config? Service IDs are pretty static so I wouldn't personally - in your scenario - be too scared to stick them in a configuration file.

If there are solutions I've overlooked in my reply to you then I'm sure someone will correct me. :-)

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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