retrieving list of services using API

I am trying to get a list of available services by connecting to the IS (6.1) using the API. I ran across a posting which said that a call to pub.universalName:list would do the job…but a call to this service does not return any services. Is there another way of doing this? I would like to be able to list the services on an IS using the API…so I can perform some custom operations.

Any pointers would be very helpful
Thanks
Prashanth

Hi Prashanth,

It’s not a published API, but you can reverse-engineer the behaviour of the Package Management section of the webMethods Administrator web pages to do what you want.

The services you will need to use are:

  • wm.server.packages.adminui:packageInfo - No input fields, returns an array of all of the packages on the server which you would then loop over, calling:
  • wm.server.packages.adminui:packageInfo - takes an input parameter of “package” which is the name of the package (e.g. “WmPublic”) - and returns an array of services in the package.

Hope this helps.

Cheers,

Steve Ovens

Steve,

Thanks for the suggestions. I notice that both the service names you gave are the same. Is there a typo? The wm.server.packages.adminui:packageInfo requires a ‘package’ parameter. Any idea how I can get the list of packages itself?

wm.server.packages.adminui:packageInfo works fine…thanks!

Regards
Prashanth

The service wm.server.packages:packageList returns a list of folders and then we can use the service wm.server.packages.adminui:packageInfo for individual package information.

Thanks Steve for pointing me in the right direction.

Prashanth

The content of this thread addresses some functionality that I need to implement too, however, I differ slightly in that I need to:

  • retrieve a list of the packages on the system (mentioned in this thread).
  • locate a range of packages in that returned list based on a specific ACL(s).
  • Would like to do this in a flow and/or java service - this brings me to my questions below…

How do I access the same services you mention in this post inside of a flow and/or java service? …Is using a DSP the only way? I have not been able to locate the services inside of Developer, so I assume this is what you mean by an unpublished API (i.e. can only access via DSP and no documentation on the inputs/outputs)?

Thanks!
Daniel

A service is a service. If you know the name you and have execute privileges on the service you can call any type of service from any other - doesn’t have to be from a DSP.

That said, it makes sense to wrap any non-documented service that you call in your own service, so:

  1. you can give it a nice name
  2. you can define a nice signature (and map your nice inputs/outputs to the ones of the non-documented service, which probably has ugly names)
  3. you have a single point of exposure if the called service changes.
  4. you can more easily write a specific validation test of your service to make sure any SP or upgrade didn’t break it.
  5. you can set the ACL to whatever is right for your application without impacting Administrator tasks or opening a security hole into internal services.

Also, it would be nice to document exactly what you want from a service and post it to the “Wish List Forum”, so it can be considered for a future release or Advantage example.

I don’t understand what you mean by “locate a range of packages in that returned list based on a specific ACL(s)”. Do you mean you want each Package’s List ACL or do you care about the execute ACLs of the contents of each package?

HTH,
Fred

Thanks for the Reply Fred, I appreciate it. I think I goofed a little when typing my last post. I meant to say groups instead of ACLs I think…

Either way, here is what I am looking to implement: I need to build a service that will return a list of packages that a user in a particular group has access to (Read, Write, Execute, and List), but none of the others. In other words, I want to request the list of packages on the IS, but I want to filter based on the a given user’s group permissions. It is important to note that they are both custom groups and ACLs that have been created.

Since my last post, I did try pasting the path to the service in the Browse->Select dialog of the invoke step in Developer. This worked somewhat, but I did not get a list of the inputs and outputs in the Inputs/Outputs tab. I subsequently went ahead an executed the service to see what would happen, and Developer growled saying a parameter was missing - which was no surprise, I expected it. This brings me to my next set of questions:

A. How do I figure out what the inputs and outputs are in an undocumented service? B. Since no inputs/outputs show up, how exactly do I make use of the pipeline tab/map steps in my wrapper service?

Thanks!
Daniel

BTW I forgot to address, "Also, it would be nice to document exactly what you want from a service and post it to the “Wish List Forum”, so it can be considered for a future release or Advantage example. ",

Your comment is noted and I will address my “Wishes” in the Wish List Forum…

[FYI]My wish list is basically this: a robust set of documented package management services for automating administrative tasks; Additional objects in the Java API would be an even bigger bonus! Plus, I am sure there are quite of few other administrative type tasks that should be in a documented, public package/API that currently are not…I realize their idea is probably to protect the IS as much as possible to maintain its integrity, however, sometimes that protection shoots SA’s in the foot and more programmatic control would be nice. ;)[FYI]

The Integration Server Team has been hesitant in publishing Java APIs because that locks in implementation details and requires future compatibility of potentially large portions of the internals. Generally, since one can perform all Admin operations via services, those interfaces are much easier to make public and should be as useful. Some of the undocumented services return undocumented Java Objects, which makes using then difficult. These issues would be cleaned up when a public version of the service is created.

There have been additions to WmPublic for package management and scheduler control in response to requests such as yours. In looking at pub.packages I am surprised there isn’t a listPackages or listEnabledPackages service.

The services called by DSPs will only return entries that the caller has List ACL on. For instance, wm.server.packages:packageList will only return packages that the caller has List ACL on.

Do you need a service that you pass in a userName and it only returns the list of Packages that that user has List ACL on?

Hi,
What needs to do for reverse-engineer the behaviour of the Package Management section of the webMethods Administrator web pages to do what you want.

Pls can you elaborate it. I didnt get you.

Thanks
Ram