You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2005/09/23 06:33:50 UTC
svn commit: r291073 [2/2] - in
/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution: ./ JMX/
JMX/Axis2Console/ JMX/Axis2Console/images/ JMX/Axis2Console/src/
JMX/Axis2Console/src/org/ JMX/Axis2Console/src/org/apache/
JMX/Axis2Console/src/org...
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/src/org/apache/axis2/console/main/TransportOutAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/src/org/apache/axis2/console/main/TransportOutAgent.java?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/src/org/apache/axis2/console/main/TransportOutAgent.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/src/org/apache/axis2/console/main/TransportOutAgent.java Thu Sep 22 21:33:22 2005
@@ -0,0 +1,117 @@
+package org.apache.axis2.console.main;
+
+import java.io.PrintWriter;
+import java.io.IOException;
+import java.util.StringTokenizer;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import javax.management.ObjectName;
+import javax.management.MBeanServerConnection;
+import javax.management.MBeanServerInvocationHandler;
+import javax.management.remote.JMXServiceURL;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+
+public class TransportOutAgent extends HttpServlet{
+
+ PrintWriter writer = null;
+
+ public void init(ServletConfig config) throws ServletException{
+
+ }
+
+ private void echo(String info){
+ writer.println("<p>" + info + "</p>");
+ }
+
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException{
+
+ writer = response.getWriter();
+
+ response.setContentType("text/html");
+ response.setHeader("Cache-Control", "no-store");
+
+ PrintWriter out = response.getWriter();
+
+ String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n";
+
+ out.println(docType +
+ "<html>\n" +
+ "<head><title>Axis2Console - TransportOut Agent</title></head>\n" +
+ "<body>");
+
+ process(request);
+
+ out.println("</body></html>");
+ }
+
+ private void process(HttpServletRequest req) {
+
+ echo("<table width=\"100%\"><tr><td><img src= \"images/asf-logo.gif\" /></td></tr><tr><td align=\"center\"><img src = \"images/axis.jpg\" /></tr><tr><td align=\"center\"><h1>Management Console</h1></tr>");
+ echo("<tr><td><a href=\"axis2console\">Axis2Console - Home</a></td></tr>");
+
+ try {
+
+ String transportOut = req.getParameter("transportOut");
+ echo("<tr><td><hr /><h1>Transport: "+transportOut+"</h1></td></tr>");
+
+ HttpSession session = req.getSession(false);
+ String host = session.getAttribute("host").toString();
+ String port = session.getAttribute("port").toString();
+ JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+host+":"+port+"/axis2");
+ JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
+ MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
+ ObjectName axis2MBeanName = new ObjectName("Axis2:type=management.Manager");
+
+ if(req.getParameter("process") != null) {
+
+ String[] params = {transportOut};
+ String[] sign = {"java.lang.String"};
+ String[] p_parameters = (String[])mbsc.invoke(axis2MBeanName, "getTransportOutParameters", params, sign);
+
+ for(int i=0; i<p_parameters.length; i++) {
+ StringTokenizer tokens = new StringTokenizer(p_parameters[i], ":");
+ String name = tokens.nextToken();
+ String value = tokens.nextToken();
+
+ String[] editParams = {transportOut, name, req.getParameter(name)};
+ String[] editSign = {"java.lang.String", "java.lang.String", "java.lang.String"};
+ mbsc.invoke(axis2MBeanName, "editTansportInParameter", editParams, editSign);
+ }
+ }
+
+ echo("<tr><td><hr /><h2>Tansport Parameters</h2></td></tr>");
+
+ String[] params = {transportOut};
+ String[] sign = {"java.lang.String"};
+ String[] parameters = (String[])mbsc.invoke(axis2MBeanName, "getTransportOutParameters", params, sign);
+
+ if(parameters.length==0) {
+ echo("<tr><td>No parameters found for this transport.</td></tr>");
+ }
+ else {
+ echo("<tr><td><form action=\"transportout\" method=\"get\"><table width=\"50%\">");
+ echo("<input name=\"transportOut\" type=\"hidden\" value=\""+transportOut+"\" />");
+ echo("<input name=\"process\" type=\"hidden\" value=\"true\" />");
+
+ for(int i=0; i<parameters.length; i++) {
+ StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+ String name = tokens.nextToken();
+ String value = tokens.nextToken();
+ echo("<tr><td>"+name+"</td><td>:<input name=\""+name+"\" type=\"text\" value=\""+value+"\" size=\"25\"/></td></tr>");
+ }
+ echo("<tr><td></td><td><input type=\"submit\" value=\"Apply\" /></td></tr>");
+ echo("</table></form></td></tr>");
+ }
+
+ }catch(Exception e) {
+ echo("<tr><td><hr />Exception occured.\n" + e.getMessage() + "</td></tr>");
+ }
+ }
+}
\ No newline at end of file
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/web.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/web.xml?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/web.xml (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/Axis2Console/web.xml Thu Sep 22 21:33:22 2005
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+ <servlet>
+ <servlet-name>Axis2Console</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.Axis2Console</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Login</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.Login</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Exporter</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.Exporter</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Importer</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.Importer</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ServiceAgent</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.ServiceAgent</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>OperationAgent</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.OperationAgent</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>ModuleAgent</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.ModuleAgent</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>TransportInAgent</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.TransportInAgent</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>TransportOutAgent</servlet-name>
+ <servlet-class>org.apache.axis2.console.main.TransportOutAgent</servlet-class>
+ </servlet>
+
+
+
+
+ <servlet-mapping>
+ <servlet-name>Axis2Console</servlet-name>
+ <url-pattern>/axis2console</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Login</servlet-name>
+ <url-pattern>/login</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Exporter</servlet-name>
+ <url-pattern>/exporter</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Importer</servlet-name>
+ <url-pattern>/importer</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Axis2Console</servlet-name>
+ <url-pattern>/main</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ServiceAgent</servlet-name>
+ <url-pattern>/service</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>OperationAgent</servlet-name>
+ <url-pattern>/operation</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ModuleAgent</servlet-name>
+ <url-pattern>/module</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>TransportInAgent</servlet-name>
+ <url-pattern>/transportin</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>TransportOutAgent</servlet-name>
+ <url-pattern>/transportout</url-pattern>
+ </servlet-mapping>
+
+
+</web-app>
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/ReadMe_JMX.txt
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/ReadMe_JMX.txt?rev=291073&view=auto
==============================================================================
(empty)
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/build.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/build.xml?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/build.xml (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/build.xml Thu Sep 22 21:33:22 2005
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- build file for lesson 1 -->
+
+<project name="management" default="build" basedir=".">
+ <target name="build">
+
+ <javac srcdir="src\" includes="**/*.java" />
+
+ <jar jarfile="lib\management.jar" basedir="src\" includes="**/*.class" />
+
+ </target>
+</project>
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.class
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.class?rev=291073&view=auto
==============================================================================
Binary file - no diff available.
Propchange: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.java?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXAdmin.java Thu Sep 22 21:33:22 2005
@@ -0,0 +1,40 @@
+package org.apache.axis2.management.manager;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.management.mbeans.Axis2Manager;
+
+/**
+ * JMXAdmin creates necessary MBeans and registers them using the JMXManager. It is assumed that all
+ * MBean registrations will be done in this class. Currently Axis2 has only a single MBean to wrap
+ * its management functionality.
+ *
+ */
+public class JMXAdmin{
+
+ /**
+ * This method is used to initailize and register MBeans.
+ *
+ * @param configContext
+ * @throws AxisFault
+ */
+ public static void initMBeans(ConfigurationContext configContext) throws AxisFault{
+
+ try{
+
+ // Create MBeans
+ String axis2ManagerName = "Axis2:type=management.Manager";
+ Axis2Manager axis2Manager = new Axis2Manager(configContext.getAxisConfiguration());
+
+ // Register MBeans using JMXManager
+ JMXManager jmxManager = JMXManager.getJMXManager(configContext.getAxisConfiguration());
+ jmxManager.registerMBean(axis2Manager, axis2ManagerName);
+
+
+ }catch(Exception e){
+ throw AxisFault.makeFault(e);
+ }
+
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.class
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.class?rev=291073&view=auto
==============================================================================
Binary file - no diff available.
Propchange: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.java?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/manager/JMXManager.java Thu Sep 22 21:33:22 2005
@@ -0,0 +1,191 @@
+package org.apache.axis2.management.manager;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.AxisFault;
+
+import java.rmi.registry.LocateRegistry;
+import java.util.Map;
+
+import java.lang.reflect.Method;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+
+/**
+ * JMXManager manages everything related to registering and publishing MBeans. It is not aware about
+ * the MBeans it is going to publish. Instead it provides a set of methods to register and publish any
+ * object as an MBean. Currently only JMXAdmin uses this to publish MBeans. But this can be used by any module
+ * to publish objects for management. This is a singleton class and the users should use the "getJMXManager"
+ * factory method to obtain an instance of this.
+ *
+ */
+public class JMXManager{
+
+ private static JMXManager jmxManager = null;
+
+ private Class registryClass = null;
+ private Object registry = null;
+ private Method registerComponent = null;
+
+ /**
+ * This is a factory method to create a JMXManager. Only one JMXManager instance is allowed.
+ *
+ * @throws AxisFault
+ */
+ public static JMXManager getJMXManager(AxisConfiguration axisConfig) throws AxisFault{
+
+ if(jmxManager != null){
+ return jmxManager;
+ }
+ else{
+ jmxManager = new JMXManager(axisConfig);
+ return jmxManager;
+ }
+
+ }
+
+
+ /**
+ * Initializes the modeler and publishes the MBeanServer in RMI.
+ *
+ * @throws AxisFault
+ */
+ private JMXManager(AxisConfiguration axisConfig) throws AxisFault{
+
+ try{
+ initModeler();
+
+ String host = "localhost";
+ String port = "8181";
+ Parameter jmxPort = null;
+ jmxPort = axisConfig.getParameter("jmx_port");
+ if(jmxPort != null)
+ port = jmxPort.getValue().toString();
+
+ publishRMI(host, port);
+
+ }catch(Exception e){
+ throw AxisFault.makeFault(e);
+ }
+
+ }
+
+
+ /**
+ * This method initializes the modeler registry. An MBeanServer is created if it was not alrady
+ * created.
+ *
+ * @throws AxisFault
+ */
+ public boolean initModeler() throws Exception{
+
+ try {
+ registryClass = Class.forName("org.apache.commons.modeler.Registry");
+ } catch (ClassNotFoundException e) {
+ registry = null;
+ return false;
+ }
+
+ try {
+ Class[] getRegistryArgs = new Class[]{Object.class, Object.class,};
+ Method getRegistry = registryClass.getMethod("getRegistry", getRegistryArgs);
+ Object[] getRegistryOptions = new Object[]{null, null};
+ registry = getRegistry.invoke(null, getRegistryOptions);
+
+ Class[] registerComponentArgs = new Class[]{Object.class, String.class, String.class};
+ registerComponent = registryClass.getMethod("registerComponent", registerComponentArgs);
+
+ } catch (IllegalAccessException e) {
+ throw e;
+ } catch (IllegalArgumentException e) {
+ throw e;
+ } catch (InvocationTargetException e) {
+ throw e;
+ } catch (NoSuchMethodException e) {
+ throw e;
+ }
+
+ return true;
+ }
+
+
+ /**
+ * This method is used to register MBeans. It registers any object provided to it as an MBean.
+ * All public fields and methods of the object will be exposed for management.
+ *
+ * @param mbean
+ * @param mbeanName
+ * @throws AxisFault
+ */
+ public boolean registerMBean(Object mbean, String mbeanName) throws Exception{
+
+ String context = "Axis2";
+
+ if (registry != null) {
+ Object args[] = new Object[]{mbean, mbeanName, context};
+ try {
+ registerComponent.invoke(registry, args);
+ } catch (IllegalAccessException e) {
+ return false;
+ } catch (IllegalArgumentException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ return false;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+
+
+ /**
+ * Publishes the MBeanServer in RMI. Currently this method is called in the constructor, so that the
+ * MBeanServer is always published. But it is yet to be decided whether to make this optional. In such
+ * case JMXAdmin admin may call this, if it is activated by the adminstrator.
+ *
+ * @throws AxisFault
+ */
+ public void publishRMI(String host, String port) throws Exception{
+
+ java.rmi.registry.Registry reg=null; // RMI registry
+
+ // create RMI registry on specified port
+ try {
+ if( reg==null )
+ reg=LocateRegistry.createRegistry(Integer.parseInt(port));
+ } catch(Exception e) {
+ throw new AxisFault(e.getMessage());
+ }
+
+ // Retreive the MBeanServer used by the modeler
+ Method getMBeanServer = registryClass.getMethod("getMBeanServer", null);
+ Object mbs = getMBeanServer.invoke(registry, null);
+
+ // create an JMXServiceURL object with the service URL
+ Class jmxServiceURLClass = Class.forName("javax.management.remote.JMXServiceURL");
+ Class[] constructorArgs = new Class[]{String.class};
+ Constructor jmxServiceURLConstructor = jmxServiceURLClass.getConstructor(constructorArgs);
+
+ String serviceURL = "service:jmx:rmi:///jndi/rmi://"+host+":"+port+"/axis2";
+ Object jmxServiceURL = jmxServiceURLConstructor.newInstance(new String[]{serviceURL});
+
+ // Create and start a JMXConnector server
+ Class mbeanServerClass = Class.forName("javax.management.MBeanServer");
+ Class jmxConnectorServerFactoryClass = Class.forName("javax.management.remote.JMXConnectorServerFactory");
+ Class[] newJMXConnectorServerArgsTypes = new Class[]{jmxServiceURLClass, Map.class, mbeanServerClass};
+ Method newJMXConnectorServer = jmxConnectorServerFactoryClass.getMethod("newJMXConnectorServer", newJMXConnectorServerArgsTypes);
+
+ Object[] newJMXConnectorServerArgs = {jmxServiceURL, null, mbs};
+ Object jmxConnectorServer = newJMXConnectorServer.invoke(null, newJMXConnectorServerArgs);
+
+ Class jmxConnectorServerClass = Class.forName("javax.management.remote.JMXConnectorServer");
+ Method start = jmxConnectorServerClass.getMethod("start", null);
+ start.invoke(jmxConnectorServer, null);
+
+ }
+
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.class
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.class?rev=291073&view=auto
==============================================================================
Binary file - no diff available.
Propchange: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.class
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.java?rev=291073&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis2Contribution/JMX/management/src/org/apache/axis2/management/mbeans/Axis2Manager.java Thu Sep 22 21:33:22 2005
@@ -0,0 +1,931 @@
+package org.apache.axis2.management.mbeans;
+
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisConfigurationImpl;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.ModuleDescription;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.engine.Phase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.ParameterImpl;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
+
+import org.apache.wsdl.impl.WSDLServiceImpl;
+
+import javax.xml.namespace.QName;
+import java.util.*;
+
+public class Axis2Manager{
+
+ private AxisConfiguration axisConfig;
+
+
+ public Axis2Manager(AxisConfiguration axisConfig){
+ this.axisConfig = axisConfig;
+ }
+
+
+ public boolean isModuleAvailable(String moduleName) {
+
+ ModuleDescription module = null;
+ try {
+ module = axisConfig.getModule(new QName(moduleName));
+ } catch(Exception e) {}
+
+ if(module == null)
+ return false;
+
+ return true;
+ }
+
+
+ public boolean isTransportInAvailable(String transportInName) {
+
+ TransportInDescription transportIn = null;
+ try {
+ transportIn = axisConfig.getTransportIn(new QName(transportInName));
+ } catch(Exception e) {}
+
+ if(transportIn == null)
+ return false;
+
+ return true;
+ }
+
+
+ public boolean isTransportOutAvailable(String transportOutName) {
+
+ TransportOutDescription transportOut = null;
+ try {
+ transportOut = axisConfig.getTransportOut(new QName(transportOutName));
+ } catch(Exception e) {}
+
+ if(transportOut == null)
+ return false;
+
+ return true;
+ }
+
+
+ public boolean isServiceAvailable(String serviceName) {
+
+ ServiceDescription service = null;
+ try {
+ service = axisConfig.getService(new QName(serviceName));
+ } catch(Exception e) {}
+
+ if(service == null)
+ return false;
+
+ return true;
+ }
+
+
+ public boolean isOperationAvailable(String serviceName, String operationName) {
+
+ ServiceDescription service = null;
+ OperationDescription operation = null;
+ try {
+ service = axisConfig.getService(new QName(serviceName));
+ if(service == null)
+ return false;
+
+ operation = service.getOperation(new QName(operationName));
+ if(operation == null)
+ return false;
+
+ } catch(Exception e) {}
+
+ return true;
+ }
+
+
+
+ public String[] getGlobalParameters(){
+
+ String[] paramters = null;
+
+ try{
+ ArrayList paramList = axisConfig.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+ public boolean isGlobalParameter(String paramName) {
+
+ Parameter parameter = null;
+ parameter = axisConfig.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+ public void addGlobalParameter(String name, String value) {
+ Parameter param = new ParameterImpl(name, value);
+ axisConfig.addParameter(param);
+ }
+
+
+ public String editGlobalParameter(String name, String value) {
+
+ String info = "";
+
+ try{
+ Parameter parameter = axisConfig.getParameter(name);
+ if(parameter == null)
+ throw new Exception("Parameter: " + name + " not found.");
+
+ parameter.setValue(value);
+ info = "Parameter changed successfully.";
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getModuleParameters(String moduleName){
+
+ String[] paramters = null;
+
+ try{
+ ModuleDescription moduleDesc = axisConfig.getModule(new QName(moduleName));
+ ArrayList paramList = moduleDesc.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+
+ public boolean isModuleParameter(String moduleName, String paramName) throws Exception {
+
+ Parameter parameter = null;
+ ModuleDescription moduleDesc = axisConfig.getModule(new QName(moduleName));
+ parameter = moduleDesc.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+
+ public void addModuleParameter(String moduleName, String name, String value) throws Exception {
+ Parameter param = new ParameterImpl(name, value);
+ ModuleDescription moduleDesc = axisConfig.getModule(new QName(moduleName));
+ moduleDesc.addParameter(param);
+ }
+
+
+ public String editModuleParameter(String moduleName, String parameterName, String value) {
+
+ String info = "";
+
+ try{
+
+ ModuleDescription moduleDesc = axisConfig.getModule(new QName(moduleName));
+ Parameter parameter = moduleDesc.getParameter(parameterName);
+ if(parameter == null)
+ throw new Exception("Parameter: " + parameterName + " not found.");
+
+ parameter.setValue(value);
+ info = "Paramter changed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getTransportInParameters(String transportInName){
+
+ String[] paramters = null;
+
+ try{
+ TransportInDescription transportInDesc = axisConfig.getTransportIn(new QName(transportInName));
+ ArrayList paramList = transportInDesc.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+
+ public boolean isTransportInParameter(String transportInName, String paramName) throws Exception {
+
+ Parameter parameter = null;
+ TransportInDescription transportInDesc = axisConfig.getTransportIn(new QName(transportInName));
+ parameter = transportInDesc.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+
+ public void addTransportInParameter(String transportInName, String name, String value) throws Exception {
+ Parameter param = new ParameterImpl(name, value);
+ TransportInDescription transportInDesc = axisConfig.getTransportIn(new QName(transportInName));
+ transportInDesc.addParameter(param);
+ }
+
+
+ public String editTransportInParameter(String transportInName, String parameterName, String value) {
+
+ String info = "";
+
+ try{
+
+ TransportInDescription transportInDesc = axisConfig.getTransportIn(new QName(transportInName));
+ Parameter parameter = transportInDesc.getParameter(parameterName);
+ if(parameter == null)
+ throw new Exception("Parameter: " + parameterName + " not found.");
+
+ parameter.setValue(value);
+ info = "Paramter changed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getTransportOutParameters(String transportOutName){
+
+ String[] paramters = null;
+
+ try{
+ TransportOutDescription transportOutDesc = axisConfig.getTransportOut(new QName(transportOutName));
+ ArrayList paramList = transportOutDesc.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+
+ public boolean isTransportOutParameter(String transportOutName, String paramName) throws Exception {
+
+ Parameter parameter = null;
+ TransportOutDescription transportOutDesc = axisConfig.getTransportOut(new QName(transportOutName));
+ parameter = transportOutDesc.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+
+ public void addTransportOutParameter(String transportOutName, String name, String value) throws Exception {
+ Parameter param = new ParameterImpl(name, value);
+ TransportOutDescription transportOutDesc = axisConfig.getTransportOut(new QName(transportOutName));
+ transportOutDesc.addParameter(param);
+ }
+
+
+ public String editTransportOutParameter(String transportOutName, String parameterName, String value) {
+
+ String info = "";
+
+ try{
+
+ TransportOutDescription transportOutDesc = axisConfig.getTransportOut(new QName(transportOutName));
+ Parameter parameter = transportOutDesc.getParameter(parameterName);
+ if(parameter == null)
+ throw new Exception("Parameter: " + parameterName + " not found.");
+
+ parameter.setValue(value);
+ info = "Paramter changed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getServiceParameters(String serviceName){
+
+ String[] paramters = null;
+
+ try{
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ ArrayList paramList = serviceDesc.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+
+ public boolean isServiceParameter(String serviceName, String paramName) throws Exception {
+
+ Parameter parameter = null;
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ parameter = serviceDesc.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+
+ public void addServiceParameter(String serviceName, String name, String value) throws Exception {
+ Parameter param = new ParameterImpl(name, value);
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ serviceDesc.addParameter(param);
+ }
+
+
+ public String editServiceParameter(String serviceName, String parameterName, String value) {
+
+ String info = "";
+
+ try{
+
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ Parameter parameter = serviceDesc.getParameter(parameterName);
+ if(parameter == null)
+ throw new Exception("Parameter: " + parameterName + " not found.");
+
+ parameter.setValue(value);
+ info = "Paramter changed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getOperationParameters(String serviceName, String operationName){
+
+ String[] paramters = null;
+
+ try{
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ OperationDescription operationDesc = serviceDesc.getOperation(new QName(operationName));
+ ArrayList paramList = operationDesc.getParameters();
+ paramters = new String[paramList.size()];
+
+ for (int i = 0; i < paramList.size(); i++) {
+ Parameter parameter = (Parameter)paramList.get(i);
+ paramters[i] = parameter.getName() + ":" + parameter.getValue();
+ }
+
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return paramters;
+ }
+
+
+ public boolean isOperationParameter(String serviceName, String operationName, String paramName) throws Exception {
+
+ Parameter parameter = null;
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ OperationDescription operationDesc = serviceDesc.getOperation(new QName(operationName));
+ parameter = operationDesc.getParameter(paramName);
+
+ if(parameter == null)
+ return false;
+
+ return true;
+ }
+
+
+ public void addOperationParameter(String serviceName, String operationName, String name, String value) throws Exception {
+ Parameter param = new ParameterImpl(name, value);
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ OperationDescription operationDesc = serviceDesc.getOperation(new QName(operationName));
+ operationDesc.addParameter(param);
+ }
+
+
+ public String editOperationParameter(String serviceName, String operationName, String parameterName, String value) {
+
+ String info = "";
+
+ try{
+
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ OperationDescription operationDesc = serviceDesc.getOperation(new QName(operationName));
+ Parameter parameter = operationDesc.getParameter(parameterName);
+ if(parameter == null)
+ throw new Exception("Parameter: " + parameterName + " not found.");
+
+ parameter.setValue(value);
+ info = "Parameter changed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String turnoffOperation(String serviceName, String operationName){
+
+ String info = "";
+
+ try{
+
+ ServiceDescription serviceDesc = axisConfig.getService(new QName(serviceName));
+ OperationDescription operationDesc = serviceDesc.getOperation(operationName);
+ serviceDesc.removeOperation(operationDesc);
+
+ info = "operation: " + operationName + " was turned off from the service: " + serviceName;
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String removeService(String serviceName){
+
+ String info = "";
+
+ try{
+
+ axisConfig.removeService(new QName(serviceName));
+ info = "Service: " + serviceName + " removed successfully.";
+
+ }catch(Exception e){
+ info = e.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String[] getServices(){
+
+ String[] services = null;
+
+ // get the service list
+ HashMap serviceMap = axisConfig.getServices();
+ if(serviceMap!=null && !serviceMap.isEmpty()){
+ Collection serviceCollection = serviceMap.values();
+
+ // add name of each service to a string array
+ services = new String[serviceCollection.size()];
+
+ int i=0;
+ for(Iterator iterator=serviceCollection.iterator(); iterator.hasNext();){
+ ServiceDescription axisService = (ServiceDescription)iterator.next();
+ String serviceName = axisService.getName().getLocalPart();
+
+ services[i] = serviceName;
+ i++;
+ }
+
+ }
+
+ return services;
+ }
+
+
+ public String[] getFaultyServices(){
+
+ String[] faultyServices = null;
+
+ Hashtable faultyServicesTable = axisConfig.getFaulytServices();
+ if(faultyServicesTable != null && faultyServicesTable.size() > 0){
+
+ faultyServices = new String[faultyServicesTable.size()];
+ Enumeration eFaultyServices = faultyServicesTable.keys();
+
+ int i=0;
+ while (eFaultyServices.hasMoreElements()) {
+ String faultyServiceName = (String)eFaultyServices.nextElement();
+ faultyServices[i] = faultyServiceName;
+ i++;
+ }
+ }
+
+ return faultyServices;
+ }
+
+
+ public String[] getModules(){
+
+ String[] modules = null;
+ ArrayList moduleList = new ArrayList();
+
+ // get the module list
+ HashMap moduleMap = ((AxisConfigurationImpl)axisConfig).getModules();
+ if(moduleMap!=null && !moduleMap.isEmpty()){
+ Collection moduleCollection = moduleMap.values();
+
+ modules = new String[moduleCollection.size()];
+ int i=0;
+ for(Iterator iterator=moduleCollection.iterator(); iterator.hasNext();){
+ ModuleDescription axisModule = (ModuleDescription)iterator.next();
+ String moduleName = axisModule.getName().getLocalPart();
+
+ modules[i] = moduleName;
+ i++;
+ }
+
+ }
+
+ return modules;
+ }
+
+ public boolean isEngagedGlobally(String moduleName) {
+ return axisConfig.isEngaged(new QName(moduleName));
+ }
+
+ public boolean isEngagedToService(String moduleName, String serviceName) {
+ try {
+ ServiceDescription service = axisConfig.getService(new QName(serviceName));
+ return service.getEngagedModules().contains(axisConfig.getModule(new QName(moduleName)));
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public boolean isEngagedToOperation(String moduleName, String serviceName, String operationName) {
+ try {
+ ServiceDescription service = axisConfig.getService(new QName(serviceName));
+ OperationDescription op = service.getOperation(new QName(operationName));
+ return op.getModules().contains(axisConfig.getModule(new QName(moduleName)));
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public String[] getTransportIns(){
+
+ String[] transportIns = null;
+ ArrayList transportInList = new ArrayList();
+
+ // get the transportIn list
+ HashMap transportInMap = ((AxisConfigurationImpl)axisConfig).getTransportsIn();
+ if(transportInMap!=null && !transportInMap.isEmpty()){
+ Collection transportInCollection = transportInMap.values();
+
+ transportIns = new String[transportInCollection.size()];
+ int i=0;
+ for(Iterator iterator=transportInCollection.iterator(); iterator.hasNext();){
+ TransportInDescription axisTransportIn = (TransportInDescription)iterator.next();
+ String transportInName = axisTransportIn.getName().getLocalPart();
+
+ transportIns[i] = transportInName;
+ i++;
+ }
+
+ }
+
+ return transportIns;
+ }
+
+
+ public String[] getTransportOuts(){
+
+ String[] transportOuts = null;
+ ArrayList transportOutList = new ArrayList();
+
+ // get the transportOut list
+ HashMap transportOutMap = ((AxisConfigurationImpl)axisConfig).getTransportsOut();
+ if(transportOutMap!=null && !transportOutMap.isEmpty()){
+ Collection transportOutCollection = transportOutMap.values();
+
+ transportOuts = new String[transportOutCollection.size()];
+ int i=0;
+ for(Iterator iterator=transportOutCollection.iterator(); iterator.hasNext();){
+ TransportOutDescription axisTransportOut = (TransportOutDescription)iterator.next();
+ String transportOutName = axisTransportOut.getName().getLocalPart();
+
+ transportOuts[i] = transportOutName;
+ i++;
+ }
+
+ }
+
+ return transportOuts;
+ }
+
+
+ public String[] getFaultyModules(){
+
+ String[] faultyModules = null;
+
+ Hashtable faultyModulesTable = axisConfig.getFaulytModules();
+ if(faultyModulesTable != null && faultyModulesTable.size() > 0){
+
+ faultyModules = new String[faultyModulesTable.size()];
+ Enumeration eFaultyModules = faultyModulesTable.keys();
+
+ int i = 0;
+ while (eFaultyModules.hasMoreElements()) {
+ String faultyModuleName = (String) eFaultyModules.nextElement();
+ faultyModules[i] = faultyModuleName;
+ i++;
+ }
+ }
+
+ return faultyModules;
+ }
+
+
+ public String[] getGloballyEngagedModules(){
+
+ String[] modules = null;
+ Collection engagedModuleCollection = ((AxisConfigurationImpl)axisConfig).getEngadgedModules();
+
+ if(engagedModuleCollection != null && engagedModuleCollection.size() > 0) {
+
+ modules = new String[engagedModuleCollection.size()];
+
+ int i = 0;
+ for(Iterator iterator=engagedModuleCollection.iterator(); iterator.hasNext();){
+ QName axisModule = (QName) iterator.next();
+ String moduleName = axisModule.getLocalPart();
+
+ modules[i] = moduleName;
+ i++;
+ }
+ }
+
+ return modules;
+ }
+
+ public String[] getServiceEngagedModules(String serviceName){
+
+ String[] modules = null;
+
+ try {
+
+ ServiceDescription service = axisConfig.getService(new QName(serviceName));
+ Collection engagedModuleCollection = service.getEngagedModules();
+
+ if(engagedModuleCollection != null && engagedModuleCollection.size() > 0) {
+
+ modules = new String[engagedModuleCollection.size()];
+
+ int i = 0;
+ for(Iterator iterator=engagedModuleCollection.iterator(); iterator.hasNext();){
+ ModuleDescription moduleDesc = (ModuleDescription)iterator.next();
+ QName axisModule = moduleDesc.getName();
+ String moduleName = axisModule.getLocalPart();
+
+ modules[i] = moduleName;
+ i++;
+ }
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ return modules;
+ }
+
+ public String[] getOperationEngagedModules(String serviceName, String opName){
+
+ String[] modules = null;
+
+ try {
+
+ ServiceDescription service = axisConfig.getService(new QName(serviceName));
+ OperationDescription op = service.getOperation(new QName(opName));
+ Collection engagedModuleCollection = op.getModules();
+
+ if(engagedModuleCollection != null && engagedModuleCollection.size() > 0) {
+
+ modules = new String[engagedModuleCollection.size()];
+
+ int i = 0;
+ for(Iterator iterator=engagedModuleCollection.iterator(); iterator.hasNext();){
+ ModuleDescription moduleDesc = (ModuleDescription)iterator.next();
+ QName axisModule = moduleDesc.getName();
+ String moduleName = axisModule.getLocalPart();
+
+ modules[i] = moduleName;
+ i++;
+ }
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+
+ return modules;
+ }
+
+
+ public String[] getPhases(){
+
+ ArrayList phaseList = axisConfig.getInPhasesUptoAndIncludingPostDispatch();
+ String[] phases = new String[phaseList.size()];
+
+ for(int i=0; i<phaseList.size(); i++){
+ Phase phase = (Phase)phaseList.get(i);
+ phases[i] = phase.getPhaseName();
+ }
+
+ return phases;
+ }
+
+
+ public String[] getOperations (String serviceName) throws Exception{
+
+ String[] operations = null;
+
+ HashMap operationsMap = axisConfig.getService(new QName(serviceName)).getOperations();
+
+ if(operationsMap !=null && !operationsMap.isEmpty()){
+
+ Collection operationsCollection = operationsMap.values();
+ operations = new String[operationsCollection.size()];
+
+ int i = 0;
+ for(Iterator iterator=operationsCollection.iterator(); iterator.hasNext();){
+ OperationDescription operationDesc = (OperationDescription)iterator.next();
+
+ operations[i] = operationDesc.getName().getLocalPart();
+ i++;
+ }
+ }
+
+ return operations;
+ }
+
+
+ public String engageModuleGlobally(String moduleName) {
+
+ String info = "";
+
+ try{
+ axisConfig.engageModule(new QName(moduleName));
+ info = "Module: " + moduleName + " globally enagaged successfully.";
+ }
+ catch(AxisFault axisFault){
+ info = "Module: " + moduleName + " failed to engage globally.\n" + axisFault.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String disengageModuleGlobally(String moduleName) {
+
+ String info = "";
+
+ try{
+ axisConfig.disengageModule(new QName(moduleName));
+ info = "Module: " + moduleName + " globally disenagaged successfully.";
+ }
+ catch(AxisFault axisFault){
+ info = "Module: " + moduleName + " failed to disengage globally.\n" + axisFault.getMessage();
+ }
+
+ return info;
+ }
+
+
+ public String engageModuleToService(String moduleName, String serviceName) {
+
+ String info = "";
+
+ if ( moduleName != null && serviceName != null) {
+
+ try {
+
+ axisConfig.getService(new QName(serviceName)).engageModule(axisConfig.getModule(new QName(moduleName)), axisConfig);
+ info = "Module " + moduleName + " is successfully engaged to the service " + serviceName;
+
+ } catch (AxisFault axisFault) {
+ info = "Failed to engage the module " + moduleName + " to the service " + serviceName + "\n" + axisFault.getMessage();
+ }
+ }
+
+ return info;
+ }
+
+
+ public String disengageModuleFromService(String moduleName, String serviceName){
+
+ String info = "";
+
+ if ( moduleName != null && serviceName != null) {
+
+ try {
+
+ axisConfig.getService(new QName(serviceName)).disengageModule(axisConfig.getModule(new QName(moduleName)));
+ info = "Module " + moduleName + " is successfully disengaged from the service " + serviceName;
+
+ } catch (AxisFault axisFault) {
+
+ info = "Failed to disengage the module " + moduleName + " from the service " + serviceName + "\n" + axisFault.getMessage();
+ }
+ }
+
+ return info;
+ }
+
+
+ public String engageModuleToOperation(String moduleName, String serviceName, String operationName){
+
+ String info = "";
+
+ if ( moduleName != null && serviceName != null && operationName != null) {
+ try {
+ OperationDescription operation = axisConfig.getService(new QName(serviceName)).getOperation(new QName(operationName));
+ operation.engageModule(axisConfig.getModule(new QName(moduleName)));
+
+ info = moduleName + " module engaged to the operation Successfully";
+
+ } catch (AxisFault axisFault) {
+ info = info = "Failed to engage the module " + moduleName + " to the operation " + operationName + "\n" + axisFault.getMessage();
+ }
+ }
+
+ return info;
+ }
+
+
+ public String disengageModuleFromOperation(String moduleName, String serviceName, String operationName){
+
+ String info = "";
+
+ if ( moduleName != null && serviceName != null && operationName != null) {
+ try {
+ OperationDescription operation = axisConfig.getService(new QName(serviceName)).getOperation(new QName(operationName));
+ operation.disengageModule(axisConfig.getModule(new QName(moduleName)));
+
+ info = moduleName + " module disengaged from the operation Successfully";
+
+ } catch (AxisFault axisFault) {
+ info = info = "Failed to disengage the module " + moduleName + " from the operation " + operationName + "\n" + axisFault.getMessage();
+ }
+ }
+
+ return info;
+ }
+
+
+}
\ No newline at end of file