Enabling Email and filepolling port using Webmethod service

Hello Experts,
I have a requirement where I need to disable and enable a webmethod filepolling and an email port using a webmethod service.
I just wanted to ask whether it is possible using any webmethod inbuilt service. If yes can you please tell the service name and also what input we need to pass in the service. (Example will be very helpful)

Avoid duplicate posts.

Use the below ones present in WmRoot. Use at your own risk.

WmRoot/wm.server.net.listeners:listListeners

WmRoot/wm.server.net.listeners:enableListener

WmRoot/wm.server.net.listeners:disableListener

1 Like

is the below services only for Adapter Notifications? or can we use to enable/disable file polling?

pub.art.listener:listAdapterListeners
pub.art.listener:enableListener
pub.art.listener:disableListener

Sam, the above services are for adapter listeners and notifications.

You do not find the below in WmRoot
WmRoot/wm.server.net.listeners:listListeners

WmRoot/wm.server.net.listeners:enableListener

WmRoot/wm.server.net.listeners:disableListener

Hi Mahesh,

In pub.art folder, there are already built in services for Notifications such as pub.art.notification:disablePollingNotification, pub.art.notification:enablePollingNotification. etc. Can you tell me how the

pub.art.listener:enableListener
pub.art.listener:disableListener

can be used.

I tried using the pub.art.listener:enableListener in webMethods 9.5 but am getting the following error:

Listener ****** not found.

Can these services be used instead of the ones mentioned in the WmRoot package? As you mentioned it is not advisable.

Please advice.
Thank in advance.

Steven,

If you want to enable/disable a port on your IS, you can use the services in WmRoot (see below) you can still use them and SAG will not support these services if you face any errors/issues in using them as these are internal to SAG webMethods. But you can still use them and I do it… :slight_smile:

To list all the ports on your IS use, wm.server.net.listeners:listListeners

To enable/disable the ports use, wm.server.net.listeners:enableListener / wm.server.net.listeners:disableListener

More questions?

1 Like

Hi Mahesh,

First of all, thanks for the super fast response! Really appreciate it.

Ok, got it. Can you please tell me what is the use of the following services :

pub.art.listener:enableListener
pub.art.listener:disableListener

What exactly would they be used for?
If its not too much trouble, can you please elaborate with an example?

And just to clarify, there is no other built in service that I can use other than the ones under WmRoot to disable/enable a port via a flow service?

Thanks again in advance.

pub.art.listener:enableListener
pub.art.listener:disableListener services are for adapter listeners and notifications. Eg. webSphere MQ, SAP etc

Yes there is no out of the box and you should use services from WmRoot. (There is no docs shared by SAG for this as they are very internal to them)

You have to build your own custom code using the Java API.

What is your need and requirement, can you share it here?

To add to that the below services in Deployer package can be used to list the ports.

wm.deployer.gui.UIFlatFile:listPorts
wm.deployer.gui.server.IS:listPorts

Hi,

as the Deployer feature is no default feature which is automatically available on all instances (it should only be installed if really needed), the one and only option which will work as long as SAG is not doing big changes to them is the one Mahesh has suggested.

Regards,
Holger

Hi All,

Thank you guys for all the help.

A special shout out to Mahesh! I really really appreciate your help and am glad to say that I have successfully created a flow service to enable/disable File polling ports :slight_smile:

To do so use the following service :

wm.server.net.listeners:enableListener / wm.server.net.listeners:disableListener

Which takes the following parameters as inputs

  1. Listener Key AND
  2. Package in which port is created.

Good luck!

NP :slight_smile: , but take extra care when you move from one wM version to another as these services might change without any notice. Good luck.

can you please let me know what is the . Listener Key and it will great if you can able to provide a sample to achieve email/file polling disable/enable using webmethod service

Hi,

you can find the listener keys in the config/listeners.cnf file in the package where the port is defined.
I.e. packages/WmRoot/config/listeners.cnf for standard primary and diagnostics port.

See Security -> Ports in IS Admin UI, in which packages the ports are defined.

Regards,
Holger