Generating MBeans from Web Services

This document is a step-by-step guide for developers on how to generate MBeans from an existing Web service. The Automation Engine supports Web services through the usage of MBeans in combination with the JMX Agent. Many vendors offer Web services rather than MBeans as interfaces that provide access to their applications.

Notes:

This page includes the following:

Requirements

Installation

Setting up Apache Axis

Generating Java Classes for Calling the Web Service

Creating an MBean for using the Java classes

Creating the MBean's JAR file and the Java Classes

Create a common JAR file for the two files of the MBean and the generated Java classes using an ant script. The following example shows how the file "exampleMBean.jar" is generated.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="uc4" default="exampleMBean.jar">
<property name="classes_dir" value="bin" />
<target name="exampleMBean.jar" description="Web Service MBean">
<jar jarfile="exampleMBean.jar" basedir="${classes_dir}"/>
</target>
</project>

No ant script is required in development environments such as Eclipse. Here you can generate the JAR file via menu command.

Starting the JMX Agent Using an MBean

Include the generated JAR file and the Apache Axis JAR files in the JMX agent's classpath. The call for starting the JMX agent under Windows is shown below:

Java -cp axis.jar;commons-discovery-0.2.jar;commons-logging-1.0.4.jar;
wsdl4j-1.5.1.jar;saaj.jar;exampleMBean.jar;ucxjjmx.jar;jaxrpc.jar com/uc4/ex/jmx/UCXJMX

Notes:

Usage

Creating a JMX Job

Using the MBean