46 Service no longer available in 60

Hi,

We have migrated from 4.6 Enterprise to Integration Server 6.0. However we are facing problems with certain services such as getBrokerName, getBrokerHost . In 6, they are a part of the WmBrokerAdmin package , however its API’s have not been exposed. Though they have provided with the BrokerClient class (refer to webMethods Broker Client Java API Programmers Guide.pdf), which contains the getBrokerName and getBrokerHost methods, the BrokerClient constructor itself requires the broker host and broker name apart from client group etc.

Thanks!
Sangeeta

You want the BrokerTransportFactory class, which is part of the IS code. I’m pretty sure these classes all live in server.jar.

import com.wm.app.b2b.server.dispatcher.Configurator;
import com.wm.app.b2b.server.dispatcher.comms.CommsFactory;
import com.wm.app.b2b.server.dispatcher.comms.BrokerTransportFactory;

//Get Broker connection parameters from the IS configuration.
BrokerTransportFactory transFac =
(BrokerTransportFactory)CommsFactory.getFactory(
BrokerTransportFactory.FACTORY_TYPE);
String brokerHost = transFac.getBrokerHost();
String brokerName = transFac.getBrokerName();
String clientGroup = transFac.getClientGroup();
String clientPrefix = Configurator.getClientPrefix();

The client group/prefix is what the IS uses when creating triggers and other broker clients for internal use. You may or may not want to use those values depending on what your code is trying to do.

Skip-

Thanks for the example. I tried it in a java service and it worked!

I then started looking for the documentation in wm for this and I can’t seem to find it. I looked in brokerRoot/doc and in isRoot/doc for the javaDoc files for these classes. I also searched advantage for “BrokerTransportFactory” and found only references to the message reference and a couple of obscure KB articles. Am I not looking in the right places, or is this just an “undocumented feature”?

Thanks Skip! that worked perfectly!Really appreciate your quick and accurate response!!
Especially since like Roger says…seems to be an undocumented feature!

Thanks Skip! that worked perfectly!Really appreciate your quick and accurate response!!
Especially since like Roger says…seems to be an undocumented feature!

The way we had it working is to use the service

wm.server.dispatcher.adminui:getBrokerSettings

we wrote a wrapper service that is calling the above service.

You can test it pretty easy by
http://<server>:5555/invoke/wm.server.dispatcher.adminui:getBrokerSettings