Setting up Java broker client


I’m trying to create a Broker Client for subscribing to documents in the Dead Letter Queue.
However, my packages are not being recognized.

import COM.activesw.api.client.BrokerAdminClient;
import COM.activesw.api.client.BrokerClient;
import COM.activesw.api.client.BrokerException;
import COM.activesw.api.client.BrokerEvent;
(These are not recognized)

I have the wm-brokerclient.jar file in the following paths:
I also tried adding it to my IS instance jar

It is not recognizing.

What Am I missing ?

I’m using wM 9.6

Also try here \IntegrationServer\lib\jars\

And restart the IS.

Sorry the jar wm-brokerclient.jar must be already in the server class path. Can you check here http://localhost:5555/WmRoot/server-environment.dsp

You must add this to your designer locally in package explorer… Read “To add classes and jar files to the Service Development Project”

Page 318 from 9-8_Service_Development_Help

Hi Mahesh,
Thanks for the reply.
I actually can’t see the broker client the jar in http://localhost:5555/WmRoot/server-environment.dsp
So I must add it as per the docs.

The docs says I must create a project with Package_name[Server_Name_PortName] in the service development perspective. I’m not able to follow. Should create a new structure in my package explorer ?

Any help is appreciated!

Hi Abhilash,

are you using Local Service Development or are you using the Designer to develop on a remote IS?

In the later case you can ignore these messages, but the service will still compile successfully on the IS.

The jar needs to be loaded together with IS as otherwise it will not be able to connect to broker itself.


Thank you. I was able to add the jars in the JAVA development perspective, if that’s what it’s called.

Now I am able to successfully create a client and subscribe to all documents.
The following code is doing that.

String broker_host = "localhost:6849";
	 String broker_name = null;
	 String client_group = "eventLog";
	  BrokerClient c;
	    try {
	   c = new BrokerClient(broker_host, broker_name, null,
	   client_group, "Publish Sample #1",null);
	   } catch (BrokerException ex) {
	    com.wm.util.JournalLogger.log(3,90,3,"LOG111"+ex  );
	  /* Create a deadletter subscription for all event types*/
	  try {
	  } catch (BrokerException e) {
	   com.wm.util.JournalLogger.log(3,90,3,"Catch block"+e  );
	   // TODO Auto-generated catch block

I can see the documents entering the above mentioned client and the client group in MWS.

Now, my next question is how do I retrieved the published documents back ?
Any leads are appreciated!