0
votes

I have created two queues MyFirstQueue and MySecondQueue in wso2 message broker. I am able to publish and consume messages using sample application given here.

Now using wso2 AndesAdminService class, I want to fetch queue related information like number of queue created, number of messages in each queue, purge queue and etc..in my code.

I am not getting how should I introduce AndesAdminService class in my code? And what other jars will be required ?

I have in my project the following jar files:

  1. andes-client-3.1.1.jar
  2. geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
  3. log4j-1.2.13.jar
  4. org.wso2.carbon.logging-4.4.1.jar
  5. org.wso2.securevault-1.0.0-wso2v2.jar
  6. slf4j-1.5.10.wso2v1.jar

Please provide me sample code also.

I got AndesAdminService class code here.

1
Please clarify your specific problem or add additional details to highlight exactly what you needabarisone
Hello @abarisone I am using wso2mb as a message brokering system in my project. In wso2mb, I have two queues with name, "MyFirstQueue" and "MySecondQueue". My project requirement is, I have to display information like no. of queues in wso2mb, no. of messages in queue and some more. I know AndesAdminService class provide apis for getting such information. My problem is, I am not sure, how should i use AndesAdminService class in my project. And how many jar is needed to useAndesAdminService? So, I am want any sample example which is using AndesAdminService class, so that i can get reference.Abhishek

1 Answers

0
votes

You can easily get the WSDL of the admin service. Open carbon.xml file and change HideAdminServiceWSDL to false. Then start the server with -DosgiConsole parameter. Type listAdminServices in the console. There you can get the list of admin services available and their WSDL urls. Then create a stub out of the WSDL using axis2 or some other bindings. Then use that generated stub and call the necessary methods.