How to list endpoints in v7.0?

Posted by Admin on 08-Dec-2009 11:12

Hi,

I'm new to Sonic ESB and wanted to know if there's an API in v7.0 that I can call from a standalone Java app that will allow me to list the current set of endpoints and associated properties as-per the Sonic ESB explorer?

If not, is there some other way to achieve this?

Thanks.

All Replies

Posted by Bill Wood on 08-Dec-2009 18:26

This is available in Sonic 7.6, but not before.  If you have Sonic 7.6, check the \Docs7.6\api\esb_api\index.html.   There are also samples under \ESB7.6\samples\Sample.ConfigAPI

If you absolutely need this under Sonic 7.0, you could pipe commands to ESBAdmin and then issue the sting 'list service' --- you would have to do all the parsing yourself.  Once you had an endpoint, you'd then "ESBAdmin>export endpoint xxx"  to get the xml file that lists all the properties.

BTW, there are so many changes to Sonic between 7.6 and 7.0 that upgrading would be worthwhile.  You can also just upgrade the Domain Manager and keep the old containers/configurations if that is appropriate.  That would give you the 7.6 ESB Config API, and your apps/containers would not have to change.

There is one more slight variation of this....  If your java app can work offline (i.e. not in real time), you could use ESB Admin> export (or the Deploy Export tool) to generate a .xar file with all the Endpoint configurations in it.   A .xar file is just a zip file.   The subfolder for 'endpoints' would contain xml files associated one for every endpoint -- you could parse these for values and properties of each endpoint.

Posted by Admin on 08-Dec-2009 19:06

Thanks William.

I was hoping that I'd just missed it in the v7.0 API. Using the ESBAdmin piping option I'd not considered.

The only other option I found was to de-serialize the contents of the DomainXYZ\\data\\xqEndpoints\* and use the returned AttributeSet instance to get the endpoint data. Far from ideal I know.

Thanks once again for your help.

Posted by Bill Wood on 08-Dec-2009 19:11

djackson wrote:

...

The only other option I found was to de-serialize the contents of the DomainXYZ\\data\\xqEndpoints\* and use the returned AttributeSet instance to get the endpoint data. Far from ideal I know.


I would definitely no look directly into the Directory Service.  For one thing, you'd have to be on the same machine, and for the other, you might run into concurrancy issues.  Also, the DS is no longer just loose files in future versions (7.5 and on), so this would not be portable.  Using the ESBAdmin piping would be best.  (Or if you open the ESBAdmin main() in a decompiler, you might be able to thing of a clever way to use the calls used by the command parser.  (i.e. instantiate the class and use that)

Posted by Admin on 08-Dec-2009 19:34

Fair point. I'll take a look at building an implementation that uses the ESBAdmin tool.

Thanks again.

This thread is closed