Get polling port infos

Hi,
I’d like to know how to get informations (such as the completion directory) about a “file polling port” from a webMethods service.

Where is stored this information ? I’ve seen that the port.cnf file stores information such as the monitoring directory (but there’s nothing about the completion directory which is what I’m looking for)

What service do I have to use (in WMRoot) to recover the information ?

Thanks.

Charles.

DISCLAIMER(s): you’re hacking into non-public services, any upgrade or patch might break this functionality, so make sure you update your upgrade policy/procedure to include regression testing of any service that calls this stuff. Also: I don’t work for webMethods, so don’t go running to webm support for help if you use this :wink:

Ok, so the service in question is
wm.server.net.listeners:getListener

It takes in an input called listenerKey and another one called pkg.

listenerKey is of the form:

FilePollingListener:C:\temp\filepolling

(replace c:\temp\filepolling with the directory that it is monitoring…)

and
pkg is the package which has the definition saved in it.

If you don’t know the directory that it is monitoring then you can retrieve the list of them (but you’re in trouble if you have more than one) by calling wm.server.ports:listListeners to retrieve all that sort of information.

As a side note: I’d recommend if you’re going to use this functionality in more than one service, wrap it up in another service so that you can insulate the rest of your code from any API changes webMethods might make to the Integration Server’s admin services.

regards,
Nathan Lee
WmUnit - Test framework for webMethods