axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r384160 [2/4] - in /webservices/axis2/trunk/archive/java/scratch/Axis_Management_module: ./ management/ management/etc/ management/resources/ management/resources/management-console/ management/resources/management-console/css/ management/r...
Date Wed, 08 Mar 2006 09:01:53 GMT
Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ModulesConsole.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ModulesConsole.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ModulesConsole.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ModulesConsole.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,321 @@
+package org.apache.axis2.management.console.web;
+
+import org.apache.axis2.management.console.web.stubs.AxisGlobalsStub;
+import org.apache.axis2.management.console.web.stubs.AxisServicesStub;
+import org.apache.axis2.management.console.web.stubs.AxisOperationsStub;
+import org.apache.axis2.management.console.web.stubs.AxisModulesStub;
+
+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;
+
+public class Axis2ModulesConsole extends HttpServlet{
+
+	PrintWriter writer = null;
+	String info = "";
+
+	AxisGlobalsStub axisGlobalsStub = null;
+	AxisServicesStub axisServicesStub = null;
+	AxisOperationsStub axisOperationsStub = null;
+	AxisModulesStub axisModulesStub = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	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</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/>" +
+						"</head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			out.println("</body></html>");
+
+	}
+
+
+	public void process(HttpServletRequest request, HttpServletResponse response){
+
+		echo("<table width=\"100%\" height=\"100%\"><tr><td colspan=\"2\"><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></tr></table></td><tr><td colspan=\"2\" align=\"center\"><h1>Management Console</h1></tr>");
+
+		try {
+
+			HttpSession session = request.getSession(false);
+			String host = session.getAttribute("host").toString();
+			axisGlobalsStub = new AxisGlobalsStub(host);
+			axisServicesStub = new AxisServicesStub(host);
+			axisOperationsStub = new AxisOperationsStub(host);
+			axisModulesStub = new AxisModulesStub(host);
+
+			processModules(request);
+			
+			if(request.getParameter("level") != null) {
+				engageGlobally(request);
+				engageToService(request);
+				engageToOperation(request);
+			}
+			
+			echo("<tr><td bgcolor=\"#000080\" colspan=\"2\"><font color=\"#FFFFFF\"><a href=\"axis2console\">Axis2 Globals</a> | " +
+					"<a href=\"modules\">Modules</a> | " +
+					"<a href=\"transports\">Transports</a> | " +
+					"<a href=\"service_groups\">ServiceGroups</a> | " +
+					"<a href=\"services\">Services</a> | " +
+					"<a href=\"operations\">Operations</a> | " +
+					"<a href=\"dynamicstats\">Statistics</a> | " +
+					"<a href=\"login\">Log out</a></td></tr>" +
+					"<tr><td colspan=\"2\"></font></td></tr>");
+
+			echo("<tr><td height=\"100%\" bgcolor=\"#000080\" valign=\"top\"><font color=\"#FFFFFF\">");
+			displayModules();
+			echo("</td><td width=\"80%\" align=\"left\" valign=\"top\">");
+			String moduleName = request.getParameter("module");
+			if(moduleName != null) {
+				displayModuleInformation(moduleName);
+				displayEngagedLevels(moduleName);
+				displayGlobalEngageInformation(moduleName);
+				displayServiceEngageInformation(moduleName);
+				displayOperationEngageInformation(moduleName, request.getParameter("service"));
+				echo(info);
+			} else {
+				echo("Select a module to display module configuration.");
+			}
+			echo("</td></tr></table>");
+
+		} catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+
+	}
+
+	  
+	private void processModules(HttpServletRequest request) throws Exception {
+		
+		String moduleToUpdate = request.getParameter("update");
+		if(moduleToUpdate != null) {
+			String[] parameters =axisModulesStub.getModuleParameters(moduleToUpdate);
+			for(int i=0; i<parameters.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+				String name = tokens.nextToken();
+				String value = request.getParameter(name);
+				
+				axisModulesStub.editModuleParameter(moduleToUpdate, name, value);
+			}
+		}
+	}
+	
+	  
+	private void displayModules() throws Exception {
+		
+		String[] modules = axisGlobalsStub.getModules();
+		if(modules != null) {
+			echo("<b>Modules</b>");
+			for(int i=0; i<modules.length; i++) {
+				echo("<a href=\"modules?module="+modules[i]+"\">"+modules[i]+"</a><br />");
+			}
+		} else {
+			echo("No modules are deployed");
+		}
+	}
+	
+	
+	private void displayModuleInformation(String moduleName) {
+		
+		echo("<h2>Module: " + moduleName + "</h2>");
+		echo("<h3>Module parameters</h3>");
+		
+		String[] params = axisModulesStub.getModuleParameters(moduleName);
+		if(params.length == 0) {
+			echo("No parameters are available for this module.");
+		} else {
+			echo("<form action=\"modules\" method=\"get\"><table>");
+			for(int i=0; i<params.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(params[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 colspan=\"2\"><input type=\"hidden\" name=\"module\" value=\""+moduleName+"\" />"+
+					"<input type=\"hidden\" name=\"update\" value=\""+moduleName+"\" />" +
+					"<input type=\"submit\" value=\"Update\" /></td></tr>");
+			echo("</table></form><br />");
+		}
+	}
+	
+	
+	private void displayEngagedLevels(String moduleName) {
+		
+		echo("<hr /><h2>Engagement details</h2>");
+		
+		echo("<h3>Global engagement</h3>");
+		if(axisModulesStub.isEngagedGlobally(moduleName).equals("TRUE")) {
+			echo("This module is engaged globally.");
+		} else {
+			echo("This module is not engaged globally.");
+		}
+		
+		echo("<h3>Service level engagement</h3>");
+		String[] engagedServices = axisModulesStub.getEngagedServices(moduleName);
+		if(engagedServices.length == 0) {
+			echo("This module is not engaged at service level.");
+		} else {
+			echo("This module is engaged to following services:<ul>");
+			for(int i=0; i<engagedServices.length; i++) {
+				echo("<li>"+engagedServices[i]+"</li>");
+			}
+			echo("</ul>");
+		}
+		
+		echo("<h3>Operation level engagement</h3>");
+		String[] engagedOperations = axisModulesStub.getEngagedOperations(moduleName);
+		if(engagedOperations.length == 0) {
+			echo("This module is not engaged at operation level.");
+		} else {
+			echo("This module is engaged to following operations:<ul>");
+			for(int i=0; i<engagedOperations.length; i++) {
+				echo("<li>"+engagedOperations[i]+"</li>");
+			}
+			echo("</ul>");
+		}
+	}
+	
+	
+	private void displayGlobalEngageInformation(String moduleName) {
+		
+		echo("<hr /><h2>Engage module globally</h2>");
+		
+		echo("<form action=\"modules\" method=\"get\">" +
+				"<input type=\"hidden\" name=\"module\" value=\""+moduleName+"\" />" +
+				"<input type=\"hidden\" name=\"level\" value=\"global\" />" +
+				"<input type=\"submit\" value=\"Engage\" /></form>");
+	}
+	
+	
+	private void displayServiceEngageInformation(String moduleName) {
+		
+		echo("<h2>Engage module to service</h2>");
+		
+		echo("<form action=\"modules\" method=\"get\">" +
+				"<input type=\"hidden\" name=\"module\" value=\""+moduleName+"\" />" +
+				"<input type=\"hidden\" name=\"level\" value=\"service\" />" +
+				"<select name=\"service\">");
+		String[] services = axisGlobalsStub.getServices();
+		for(int i=0; i<services.length; i++) {
+			echo("<option align=\"left\" value=\""+services[i]+"\">"+services[i]+"</option>");
+		}
+		echo("</select>" +
+		"<input type=\"submit\" value=\"Engage\" /></form>");
+	}
+	
+	
+	private void displayOperationEngageInformation(String moduleName, String serviceName) {
+		
+		echo("<h2>Engage module to operation</h2>");
+		
+		echo("<form action=\"modules\" method=\"get\" name=\"operationEngageForm\">" +
+				"<input type=\"hidden\" name=\"module\" value=\""+moduleName+"\" />" +
+				"<input type=\"hidden\" name=\"level\" value=\"operation\" />" +
+				"<input type=\"hidden\" name=\"serviceChanged\"/>" +
+				"<select name=\"service\" onChange=\"document.operationEngageForm.serviceChanged.value=true;document.operationEngageForm.submit()\">");
+		String[] services = axisGlobalsStub.getServices();
+		for(int i=0; i<services.length; i++) {
+			String selected = "";
+			if(services[i].equals(serviceName)) {
+				selected = "selected=\"true\"";
+			}
+			echo("<option "+selected+"align=\"left\" value=\""+services[i]+"\">"+services[i]+"</option>");
+		}
+		echo("</select>" +
+				"<select name=\"operation\">");
+		
+		if(serviceName == null) {
+			String[] deployedServices = axisGlobalsStub.getServices();
+			if(deployedServices.length == 0)
+				echo("<option>-No services are deployed-</option>");
+			else
+				serviceName = deployedServices[0];
+		} 
+		
+		String[] operations = axisServicesStub.getOperations(serviceName);
+		for(int i=0; i<operations.length; i++) {
+			echo("<option align=\"left\" value=\""+operations[i]+"\">"+operations[i]+"</option>");
+		}
+		
+		echo("</select>" +
+				"<input type=\"submit\" value=\"Engage\" /></form>");
+	}
+	
+	
+	private void engageGlobally(HttpServletRequest request) {
+		
+		if(request.getParameter("level").equals("global")) {
+			String module = request.getParameter("module");
+			
+			if(module != null) {
+				axisGlobalsStub.engageModuleGlobally(module);
+				info = "Module "+module+" globally engaged successfully.";
+			}
+		}
+	}
+	
+	
+	private void engageToService(HttpServletRequest request) {
+		
+		if(request.getParameter("level").equals("service")) {
+			String module = request.getParameter("module");
+			String service = request.getParameter("service");
+			
+			if(module != null && service != null) {
+				axisServicesStub.engageModuleToService(module, service);
+				info = "Module "+module+" engaged successfully to service "+service+".";
+			}
+		}
+	}
+	
+	
+	private void engageToOperation(HttpServletRequest request) {
+		
+		if(request.getParameter("level").equals("operation")) {
+			String module = request.getParameter("module");
+			String service = request.getParameter("service");
+			String operation = request.getParameter("operation");
+			
+			if(module != null && service != null && operation != null && !request.getParameter("serviceChanged").equals("true")) {
+				axisOperationsStub.engageModuleToOperation(module, service, operation);
+				info = "Module "+module+" engaged successfully to operation "+operation+" of service "+service+".";
+			}
+		}
+	}
+	  
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2OperationsConsole.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2OperationsConsole.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2OperationsConsole.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2OperationsConsole.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,217 @@
+package org.apache.axis2.management.console.web;
+
+import org.apache.axis2.management.console.web.stubs.AxisServicesStub;
+import org.apache.axis2.management.console.web.stubs.AxisOperationsStub;
+import org.apache.axis2.management.console.web.stubs.AxisGlobalsStub;
+
+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;
+
+public class Axis2OperationsConsole extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	AxisServicesStub axisServicesStub = null;
+	AxisOperationsStub axisOperationsStub = null;
+	AxisGlobalsStub axisGlobalsStub = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	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</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			out.println("</body></html>");
+
+	}
+
+
+	public void process(HttpServletRequest request, HttpServletResponse response){
+
+		echo("<table width=\"100%\" height=\"100%\"><tr><td colspan=\"2\"><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></tr></table></td><tr><td colspan=\"2\" align=\"center\"><h1>Management Console</h1></tr>");
+
+		try {
+
+			HttpSession session = request.getSession(false);
+			String host = session.getAttribute("host").toString();
+			axisServicesStub = new AxisServicesStub(host);
+			axisOperationsStub = new AxisOperationsStub(host);
+			axisGlobalsStub = new AxisGlobalsStub(host);
+
+			processOperations(request);
+			processModules(request);
+			
+			echo("<tr><td bgcolor=\"#000080\" colspan=\"2\"><font color=\"#FFFFFF\"><a href=\"axis2console\">Axis2 Globals</a> | " +
+					"<a href=\"modules\">Modules</a> | " +
+					"<a href=\"transports\">Transports</a> | " +
+					"<a href=\"service_groups\">ServiceGroups</a> | " +
+					"<a href=\"services\">Services</a> | " +
+					"<a href=\"operations\">Operations</a> | " +
+					"<a href=\"dynamicstats\">Statistics</a> | " +
+					"<a href=\"login\">Log out</a></td></tr>" +
+					"<tr><td colspan=\"2\"></font></td></tr>");
+
+			echo("<tr><td height=\"100%\" bgcolor=\"#000080\" valign=\"top\"><font color=\"#FFFFFF\">");
+			displayOperations(request.getParameter("service"));
+			echo("</td><td width=\"80%\" align=\"left\" valign=\"top\">");
+			displayOperationInformation(request.getParameter("service"), request.getParameter("operation"));
+			echo("</td></tr></table>");
+
+		} catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+
+	}
+
+	  
+	private void processOperations(HttpServletRequest request) throws Exception {
+		
+		String operationToUpdate = request.getParameter("update");
+		if(operationToUpdate != null) {
+			String service = request.getParameter("service");
+			String[] parameters =axisOperationsStub.getOperationParameters(service, operationToUpdate);
+			for(int i=0; i<parameters.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+				String name = tokens.nextToken();
+				String value = request.getParameter(name);
+				
+				axisOperationsStub.editOperationParameter(service, operationToUpdate, name, value);
+			}
+		}
+	}
+	
+	  
+	private void displayOperations(String service) throws Exception {
+		
+		String[] services = axisGlobalsStub.getServices();
+		echo("<form action=\"operations\" method=\"get\">" +
+				"<select name=\"service\">");
+		for(int i=0; i<services.length; i++) {
+			String selected = "";
+			if(services[i].equals(service)) {
+				selected = "selected=\"true\" ";
+			}
+			echo("<option "+selected+"align=\"left\" value=\""+services[i]+"\">"+services[i]+"</option>");
+		}
+		echo("</select><br />" +
+				"<input type=\"submit\" value=\"Select service\" /></form>");
+		
+		if(service == null) {
+			echo("No services are selected.");
+			return;
+		}
+		
+		String[] ops = axisServicesStub.getOperations(service);
+		if(ops != null) {
+			echo("<b>Operations</b>");
+			for(int i=0; i<ops.length; i++) {
+				echo("<a href=\"operations?service="+service+"&operation="+ops[i]+"\">"+ops[i]+"</a><br />");
+			}
+		} else {
+			echo("No operations are available.");
+		}
+	}
+	
+	
+	private void displayOperationInformation(String serviceName, String opName) {
+		
+		if(serviceName == null || opName == null) {
+			echo("Select a service and an operation to display operation configuration.");
+			return;
+		}
+	
+		echo("<h2>Operation: " + opName + "</h2>");
+		
+		echo("<h3>Operation parameters</h3>");
+		String[] params = axisOperationsStub.getOperationParameters(serviceName, opName);
+		if(params.length == 0) {
+			echo("No parameters are available for this operation.");
+		} else {
+			echo("<form action=\"operations\" method=\"get\"><table>");
+			for(int i=0; i<params.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(params[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 colspan=\"2\"><input type=\"hidden\" name=\"service\" value=\""+serviceName+"\" />"+
+					"<input type=\"hidden\" name=\"operation\" value=\""+opName+"\" />"+
+					"<input type=\"hidden\" name=\"update\" value=\""+opName+"\" />" +
+					"<input type=\"submit\" value=\"Update\" /></td></tr>");
+			echo("</table></form><br />");
+		}
+		
+		echo("<hr /><h3>Engaged modules for this operation</h3>");
+		String[] operationModules = axisOperationsStub.getOperationEngagedModules(serviceName, opName);
+		if(operationModules.length == 0) {
+			echo("No modules are engaged for this operation.");
+		} else {
+			echo("<ul>");
+			for(int i=0; i<operationModules.length; i++) {
+				echo("<li>"+operationModules[i]+"</li>");
+			}
+			echo("</ul>");
+		}
+		
+		echo("<hr /><h3>Engage module to operation</h3>");
+		echo("<form action=\"operations\" method=\"get\">" +
+				"<select name=\"module\">");
+		
+		String[] modules = axisGlobalsStub.getModules();
+		for(int i=0; i<modules.length; i++) {
+			echo("<option align=\"left\" value=\""+modules[i]+"\">"+modules[i]+"</option>");
+		}
+		echo("</select>" +
+				"<input type=\"hidden\" name=\"service\" value=\""+serviceName+"\" />" +
+				"<input type=\"hidden\" name=\"operation\" value=\""+opName+"\" />" +
+				"<input type=\"hidden\" name=\"modules\" value=\"modules\" />" +
+				"<input type=\"submit\" value=\"Engage\" /></form>");	
+	}
+	
+	
+	private void processModules(HttpServletRequest request) throws Exception {
+		String modules = request.getParameter("modules");
+		if(modules != null) {
+			String service = request.getParameter("service");
+			String operation = request.getParameter("operation");
+			String module = request.getParameter("module");
+			axisOperationsStub.engageModuleToOperation(module, service, operation);
+		}
+	}
+	  
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServiceGroupsConsole.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServiceGroupsConsole.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServiceGroupsConsole.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServiceGroupsConsole.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,162 @@
+package org.apache.axis2.management.console.web;
+
+import org.apache.axis2.management.console.web.stubs.AxisServiceGroupsStub;
+import org.apache.axis2.management.console.web.stubs.AxisGlobalsStub;
+
+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;
+
+public class Axis2ServiceGroupsConsole extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	AxisServiceGroupsStub axisServiceGroupsStub = null;
+	AxisGlobalsStub axisGlobalsStub = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	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</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			out.println("</body></html>");
+
+	}
+
+
+	public void process(HttpServletRequest request, HttpServletResponse response){
+
+		echo("<table width=\"100%\" height=\"100%\"><tr><td colspan=\"2\"><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></tr></table></td><tr><td colspan=\"2\" align=\"center\"><h1>Management Console</h1></tr>");
+
+		try {
+
+			HttpSession session = request.getSession(false);
+			String host = session.getAttribute("host").toString();
+			axisServiceGroupsStub = new AxisServiceGroupsStub(host);
+			axisGlobalsStub = new AxisGlobalsStub(host);
+
+			processModules(request);
+			
+			echo("<tr><td bgcolor=\"#000080\" colspan=\"2\"><font color=\"#FFFFFF\"><a href=\"axis2console\">Axis2 Globals</a> | " +
+					"<a href=\"modules\">Modules</a> | " +
+					"<a href=\"transports\">Transports</a> | " +
+					"<a href=\"service_groups\">ServiceGroups</a> | " +
+					"<a href=\"services\">Services</a> | " +
+					"<a href=\"operations\">Operations</a> | " +
+					"<a href=\"dynamicstats\">Statistics</a> | " +
+					"<a href=\"login\">Log out</a></td></tr>" +
+					"<tr><td colspan=\"2\"></font></td></tr>");
+
+			echo("<tr><td height=\"100%\" bgcolor=\"#000080\" valign=\"top\"><font color=\"#FFFFFF\">");
+			displayServiceGroups();
+			echo("</td><td width=\"80%\" align=\"left\" valign=\"top\">");
+			displayServiceGroupInformation(request.getParameter("service_group"));
+			echo("</td></tr></table>");
+
+		} catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+
+	}
+	
+	  
+	private void displayServiceGroups() throws Exception {
+		
+		String[] serviceGroups = axisGlobalsStub.getServiceGroups();
+		if(serviceGroups != null) {
+			echo("<b>ServiceGroups</b>");
+			for(int i=0; i<serviceGroups.length; i++) {
+				echo("<a href=\"service_groups?service_group="+serviceGroups[i]+"\">"+serviceGroups[i]+"</a><br />");
+			}
+		} else {
+			echo("No ServiceGroups are deployed");
+		}
+	}
+	
+	
+	private void displayServiceGroupInformation(String serviceGroupName) {
+		
+		if(serviceGroupName == null) {
+			echo("Select a ServiceGroup to display configuration.");
+			return;
+		}
+		
+		echo("<h2>ServiceGroup: " + serviceGroupName + "</h2>");
+		
+		echo("<h3>Engaged modules for this ServiceGroup</h3>");
+		String[] serviceGroupModules = axisServiceGroupsStub.getServiceGroupEngagedModules(serviceGroupName);
+		if(serviceGroupModules.length == 0) {
+			echo("No modules are engaged for this ServiceGroup.");
+		} else {
+			echo("<ul>");
+			for(int i=0; i<serviceGroupModules.length; i++) {
+				echo("<li>"+serviceGroupModules[i]+"</li>");
+			}
+			echo("</ul>");
+		}
+		
+		echo("<h3>Engage module to ServiceGroup</h3>");
+		echo("<form action=\"service_groups\" method=\"get\">" +
+				"<select name=\"module\">");
+		
+		String[] modules = axisGlobalsStub.getModules();
+		for(int i=0; i<modules.length; i++) {
+			echo("<option align=\"left\" value=\""+modules[i]+"\">"+modules[i]+"</option>");
+		}
+		echo("</select>" +
+				"<input type=\"hidden\" name=\"service_group\" value=\""+serviceGroupName+"\" />" +
+				"<input type=\"hidden\" name=\"modules\" value=\"modules\" />" +
+				"<input type=\"submit\" value=\"Engage\" /></form>");	
+		
+		echo("<p>Click the button below to display operations of this service.");
+		echo("<form action=\"services\" method=\"get\">" +
+				"<input type=\"hidden\" name=\"service_group\" value=\""+serviceGroupName+"\" />" +
+				"<input type=\"submit\" value=\"Services\" /></form></p><br />");
+	}
+	
+	
+	private void processModules(HttpServletRequest request) throws Exception {
+		String modules = request.getParameter("modules");
+		if(modules != null) {
+			String serviceGroup = request.getParameter("service_group");
+			String module = request.getParameter("module");
+			axisServiceGroupsStub.engageModuleToServiceGroup(module, serviceGroup);
+		}
+	}
+	  
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServicesConsole.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServicesConsole.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServicesConsole.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2ServicesConsole.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,219 @@
+package org.apache.axis2.management.console.web;
+
+import org.apache.axis2.management.console.web.stubs.AxisServicesStub;
+import org.apache.axis2.management.console.web.stubs.AxisServiceGroupsStub;
+import org.apache.axis2.management.console.web.stubs.AxisGlobalsStub;
+
+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;
+
+public class Axis2ServicesConsole extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	AxisServiceGroupsStub axisServiceGroupsStub = null;
+	AxisServicesStub axisServicesStub = null;
+	AxisGlobalsStub axisGlobalsStub = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	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</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			out.println("</body></html>");
+
+	}
+
+
+	public void process(HttpServletRequest request, HttpServletResponse response){
+
+		echo("<table width=\"100%\" height=\"100%\"><tr><td colspan=\"2\"><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></tr></table></td><tr><td colspan=\"2\" align=\"center\"><h1>Management Console</h1></tr>");
+
+		try {
+
+			HttpSession session = request.getSession(false);
+			String host = session.getAttribute("host").toString();
+			axisServiceGroupsStub = new AxisServiceGroupsStub(host);
+			axisServicesStub = new AxisServicesStub(host);
+			axisGlobalsStub = new AxisGlobalsStub(host);
+
+			processServices(request);
+			processModules(request);
+			
+			echo("<tr><td bgcolor=\"#000080\" colspan=\"2\"><font color=\"#FFFFFF\"><a href=\"axis2console\">Axis2 Globals</a> | " +
+					"<a href=\"modules\">Modules</a> | " +
+					"<a href=\"transports\">Transports</a> | " +
+					"<a href=\"service_groups\">ServiceGroups</a> | " +
+					"<a href=\"services\">Services</a> | " +
+					"<a href=\"operations\">Operations</a> | " +
+					"<a href=\"dynamicstats\">Statistics</a> | " +
+					"<a href=\"login\">Log out</a></td></tr>" +
+					"<tr><td colspan=\"2\"></font></td></tr>");
+
+			echo("<tr><td height=\"100%\" bgcolor=\"#000080\" valign=\"top\"><font color=\"#FFFFFF\">");
+			displayServices(request.getParameter("service_group"));
+			echo("</font></td><td width=\"80%\" align=\"left\" valign=\"top\">");
+			displayServiceInformation(request.getParameter("service"));
+			echo("</td></tr></table>");
+
+		} catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+
+	}
+
+	  
+	private void processServices(HttpServletRequest request) throws Exception {
+		
+		String serviceToRemove = request.getParameter("remove");
+		if(serviceToRemove != null){
+			String result = axisGlobalsStub.removeService(serviceToRemove);
+		}
+		
+		String serviceToUpdate = request.getParameter("update");
+		if(serviceToUpdate != null) {
+			String[] parameters =axisServicesStub.getServiceParameters(serviceToUpdate);
+			for(int i=0; i<parameters.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+				String name = tokens.nextToken();
+				String value = request.getParameter(name);
+				
+				axisServicesStub.editServiceParameter(serviceToUpdate, name, value);
+			}
+		}
+	}
+	
+	  
+	private void displayServices(String serviceGroupName) throws Exception {
+		
+		String[] services = null;
+		if(serviceGroupName == null) {
+			serviceGroupName = "all";
+			services = axisGlobalsStub.getServices();
+		} else if(serviceGroupName.equals("all")) {
+			services = axisGlobalsStub.getServices();
+		} else {
+			services = axisServiceGroupsStub.getServices(serviceGroupName);
+		}
+		
+		if(services != null) {
+			echo("<b>Services</b>");
+			for(int i=0; i<services.length; i++) {
+				echo("<a href=\"services?service="+services[i]+"&service_group="+serviceGroupName+"\">"+services[i]+"</a><br />");
+			}
+		} else {
+			echo("No services available.");
+		}
+	}
+	
+	
+	private void displayServiceInformation(String serviceName) {
+		
+		if(serviceName == null) {
+			echo("Select a service to display service configuration.");
+			return;
+		}
+		
+		echo("<h2>Service: " + serviceName + "</h2>");
+		echo("<h3>Service parameters</h3>");
+		
+		String[] params = axisServicesStub.getServiceParameters(serviceName);
+		if(params.length == 0) {
+			echo("No parameters are available for this service.");
+		} else {
+			echo("<form action=\"services\" method=\"get\"><table>");
+			for(int i=0; i<params.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(params[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 colspan=\"2\"><input type=\"hidden\" name=\"service\" value=\""+serviceName+"\" />"+
+					"<input type=\"hidden\" name=\"update\" value=\""+serviceName+"\" />" +
+					"<input type=\"submit\" value=\"Update\" /></td></tr>");
+			echo("</table></form><br />");
+		}
+		
+		echo("<hr /><h3>Engaged modules for this service</h3>");
+		String[] serviceModules = axisServicesStub.getServiceEngagedModules(serviceName);
+		if(serviceModules.length == 0) {
+			echo("No modules are engaged for this service.");
+		} else {
+			echo("<ul>");
+			for(int i=0; i<serviceModules.length; i++) {
+				echo("<li>"+serviceModules[i]+"</li>");
+			}
+			echo("</ul>");
+		}
+		
+		echo("<hr /><h3>Engage module to service</h3>");
+		echo("<form action=\"services\" method=\"get\">" +
+				"<select name=\"module\">");
+		
+		String[] modules = axisGlobalsStub.getModules();
+		for(int i=0; i<modules.length; i++) {
+			echo("<option align=\"left\" value=\""+modules[i]+"\">"+modules[i]+"</option>");
+		}
+		echo("</select>" +
+				"<input type=\"hidden\" name=\"service\" value=\""+serviceName+"\" />" +
+				"<input type=\"hidden\" name=\"modules\" value=\"modules\" />" +
+				"<input type=\"submit\" value=\"Engage\" /></form>");	
+		
+		echo("<hr /><p>Click the button below to remove this service from Axis2. Note that you can't undo this operation.");
+		echo("<form action=\"services\" method=\"get\">" +
+				"<input type=\"hidden\" name=\"remove\" value=\""+serviceName+"\" />" +
+				"<input type=\"submit\" value=\"Remove service\" /></form></p><br />");
+		
+		echo("<p>Click the button below to display operations of this service.");
+		echo("<form action=\"operations\" method=\"get\">" +
+				"<input type=\"hidden\" name=\"service\" value=\""+serviceName+"\" />" +
+				"<input type=\"submit\" value=\"Operations\" /></form></p><br />");
+	}
+	
+	
+	private void processModules(HttpServletRequest request) throws Exception {
+		String modules = request.getParameter("modules");
+		if(modules != null) {
+			String service = request.getParameter("service");
+			String module = request.getParameter("module");
+			axisServicesStub.engageModuleToService(module, service);
+		}
+	}
+	  
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2TransportsConsole.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2TransportsConsole.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2TransportsConsole.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Axis2TransportsConsole.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,210 @@
+package org.apache.axis2.management.console.web;
+
+import org.apache.axis2.management.console.web.stubs.AxisGlobalsStub;
+import org.apache.axis2.management.console.web.stubs.AxisTransportsStub;
+
+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;
+
+public class Axis2TransportsConsole extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	AxisGlobalsStub axisGlobalsStub = null;
+	AxisTransportsStub axisTransportsStub = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	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</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			out.println("</body></html>");
+
+	}
+
+
+	public void process(HttpServletRequest request, HttpServletResponse response){
+
+		echo("<table width=\"100%\" height=\"100%\"><tr><td colspan=\"2\"><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></tr></table></td><tr><td colspan=\"2\" align=\"center\"><h1>Management Console</h1></tr>");
+
+		try {
+
+			HttpSession session = request.getSession(false);
+			String host = session.getAttribute("host").toString();
+			axisTransportsStub = new AxisTransportsStub(host);
+			axisGlobalsStub = new AxisGlobalsStub(host);
+
+			processTransportIns(request);
+			processTransportOuts(request);
+			
+			echo("<tr><td bgcolor=\"#000080\" colspan=\"2\"><font color=\"#FFFFFF\"><a href=\"axis2console\">Axis2 Globals</a> | " +
+					"<a href=\"modules\">Modules</a> | " +
+					"<a href=\"transports\">Transports</a> | " +
+					"<a href=\"service_groups\">ServiceGroups</a> | " +
+					"<a href=\"services\">Services</a> | " +
+					"<a href=\"operations\">Operations</a> | " +
+					"<a href=\"dynamicstats\">Statistics</a> | " +
+					"<a href=\"login\">Log out</a></td></tr>" +
+					"<tr><td colspan=\"2\"></font></td></tr>");
+
+			echo("<tr><td height=\"100%\" bgcolor=\"#000080\" valign=\"top\"><font color=\"#FFFFFF\">");
+			displayTransports();
+			echo("</td><td width=\"80%\" align=\"left\" valign=\"top\">");
+			String transportIn = request.getParameter("transport_in");
+			String transportOut = request.getParameter("transport_out");
+			if(transportIn != null)
+				displayTransportInInformation(transportIn);
+			else if(transportOut != null)
+				displayTransportOutInformation(transportOut);
+			else
+				echo("Select a transport to display transport configuration.");
+			echo("</td></tr></table>");
+
+		} catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+
+	}
+
+	  
+	private void processTransportIns(HttpServletRequest request) throws Exception {
+		
+		String transportInToUpdate = request.getParameter("update_in");
+		if(transportInToUpdate != null) {
+			String[] parameters =axisTransportsStub.getTransportInParameters(transportInToUpdate);
+			for(int i=0; i<parameters.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+				String name = tokens.nextToken();
+				String value = request.getParameter(name);
+				
+				axisTransportsStub.editTransportInParameter(transportInToUpdate, name, value);
+			}
+		}
+	}
+	
+	
+	private void processTransportOuts(HttpServletRequest request) throws Exception {
+		
+		String transportOutToUpdate = request.getParameter("update_out");
+		if(transportOutToUpdate != null) {
+			String[] parameters =axisTransportsStub.getTransportOutParameters(transportOutToUpdate);
+			for(int i=0; i<parameters.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(parameters[i], ":");
+				String name = tokens.nextToken();
+				String value = request.getParameter(name);
+				
+				axisTransportsStub.editTransportOutParameter(transportOutToUpdate, name, value);
+			}
+		}
+	}
+	
+	  
+	private void displayTransports() throws Exception {
+		
+		String[] transportIns = axisGlobalsStub.getTransportIns();
+		String[] transportOuts = axisGlobalsStub.getTransportOuts();
+		
+		if(transportIns != null) {
+			echo("<b>TransportIns</b>");
+			for(int i=0; i<transportIns.length; i++) {
+				echo("<a href=\"transports?transport_in="+transportIns[i]+"\">"+transportIns[i]+"</a><br />");
+			}
+		} else {
+			echo("No transportIns are deployed");
+		}
+		
+		if(transportOuts != null) {
+			echo("<b>TransportOuts</b>");
+			for(int i=0; i<transportOuts.length; i++) {
+				echo("<a href=\"transports?transport_out="+transportOuts[i]+"\">"+transportOuts[i]+"</a><br />");
+			}
+		} else {
+			echo("No transportOuts are deployed");
+		}
+	}
+	
+	
+	private void displayTransportInInformation(String transportName) {
+		
+		echo("<h2>Transport: " + transportName + "</h2>");
+		echo("<h3>Transport parameters</h3>");
+		
+		String[] params = axisTransportsStub.getTransportInParameters(transportName);
+		if(params.length == 0) {
+			echo("No parameters are available for this transport.");
+		} else {
+			echo("<form action=\"transports\" method=\"get\"><table>");
+			for(int i=0; i<params.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(params[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 colspan=\"2\"><input type=\"hidden\" name=\"transport_in\" value=\""+transportName+"\" />"+
+					"<input type=\"hidden\" name=\"update_in\" value=\""+transportName+"\" />" +
+					"<input type=\"submit\" value=\"Update\" /></td></tr>");
+			echo("</table></form><br />");
+		}
+	}
+	
+	
+	private void displayTransportOutInformation(String transportName) {
+		
+		echo("<h2>Transport: " + transportName + "</h2>");
+		echo("<h3>Transport parameters</h3>");
+		
+		String[] params = axisTransportsStub.getTransportOutParameters(transportName);
+		if(params.length == 0) {
+			echo("No parameters are available for this transport.");
+		} else {
+			echo("<form action=\"transports\" method=\"get\"><table>");
+			for(int i=0; i<params.length; i++) {
+				StringTokenizer tokens = new StringTokenizer(params[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 colspan=\"2\"><input type=\"hidden\" name=\"transport_out\" value=\""+transportName+"\" />"+
+					"<input type=\"hidden\" name=\"update_out\" value=\""+transportName+"\" />" +
+					"<input type=\"submit\" value=\"Update\" /></td></tr>");
+			echo("</table></form><br />");
+		}
+	}
+	  
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Error.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Error.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Error.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Error.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,63 @@
+package org.apache.axis2.management.console.web;
+
+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;
+
+public class Error extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	public void doGet(HttpServletRequest request, HttpServletResponse response)
+		throws ServletException, IOException{
+
+			writer = response.getWriter();
+
+			response.setContentType("text/html");
+			response.setHeader("Cache-Control", "no-store");
+
+			String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n";
+
+			writer.println(docType +
+						"<html>\n" +
+						"<head><title>Axis2Console</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			writer.println("</body></html>");
+	}
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+	private void process(HttpServletRequest request, HttpServletResponse response) {
+
+		echo("<table width=\"100%\"><tr><td><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></table></tr><tr><td align=\"center\"><h1>Management Console</h1></tr>");
+		echo("<tr><td><h1>Error</h1>" +
+				"<p>An error was occured while performing the operation. Please check if you have performed following steps." +
+				"<ul>" +
+					"<li>management.mar module is deployed in the \"modules\" directory.</li><br /><br />" +
+					"<li>dmservices.aar is deployed in the \"services\" directory.</li><br /><br />" +
+					"<li>dm.jar is deployed in the \"lib\" directory.</li><br /><br />" +
+					"<li>Axis2 jars are accessible from the Axis2Console servlet. Axis2Console uses Axis2 jars as a web services client. Therefore those jars should be placed in \"shared\\lib\" directory or \"webapps\\axis2web\\WEB-INF\\lib\" directory if you are using Tomcat. Consult the documentation for other servlet containers.</li><br /><br />" +
+					"<li>The host address is supplied correctly in the Login screen. Host address is the URL of Axis2 directory in the format \"http://&ltip-address&gt:&ltport&gt/axis2\". For example if you are running Tomcat on port 8080 in localhost, the host address is \"http://localhost:8080/axis2\".</li><br /><br />" +
+				"</ul>" +
+				"<br />" +
+				"Send a mail to Axis2 mailing list if you still get errors." +
+				"</p>");
+	}
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Login.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Login.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Login.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/Login.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,76 @@
+package org.apache.axis2.management.console.web;
+
+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;
+
+public class Login extends HttpServlet{
+
+	PrintWriter writer = null;
+
+	public void init(ServletConfig config) throws ServletException{
+
+	}
+
+	public void doGet(HttpServletRequest request, HttpServletResponse response)
+		throws ServletException, IOException{
+
+			HttpSession session = request.getSession(true);
+			session.setAttribute("host", "");
+
+			writer = response.getWriter();
+
+			response.setContentType("text/html");
+			response.setHeader("Cache-Control", "no-store");
+
+			String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " + "Transitional//EN\">\n";
+
+			writer.println(docType +
+						"<html>\n" +
+						"<head><title>Axis2Console</title><link href=\"css/axis-style.css\" rel=\"stylesheet\" type=\"text/css\"/></head>\n" +
+						"<body>");
+
+
+
+			process(request, response);
+
+			writer.println("</body></html>");
+	}
+
+	private void echo(String info){
+		writer.println("<p>" + info + "</p>");
+	}
+
+	private void process(HttpServletRequest request, HttpServletResponse response) {
+
+		try {
+			if(request.getParameter("process") != null) {
+				String host = request.getParameter("host");
+				HttpSession session = request.getSession(true);
+				session.setAttribute("host", host);
+				response.sendRedirect("axis2console");
+			}
+
+			echo("<table width=\"100%\"><tr><td><table width=\"100%\"><tr><td align=\"left\"><img src= \"images/asf-logo.gif\" /></td><td align=\"right\"><img src = \"images/axis.jpg\" /></td></table></tr><tr><td align=\"center\"><h1>Management Console</h1></tr>");
+			echo("<tr><td><hr /><form action=\"login\" method=\"get\">");
+			echo("<table><tr><td>Host</td><td><input name=\"host\" type=\"text\" size=\"50\"/></td></tr>");
+			echo("<input name=\"process\" type=\"hidden\" value=\"connect\"/>");
+			echo("<tr><td></td><td><input type=\"submit\" value=\"Login\" /></td></tr></table></form></td></tr>");
+			
+			echo("<tr><td colspan=\"2\">Enter the address of the remote engine. Host address is the URL of Axis2 directory in the format \"http://&ltip-address&gt:&ltport&gt/axis2\". For example if you are running Tomcat on port 8080 in localhost, the host address is \"http://localhost:8080/axis2\".</td></tr>");
+
+		}catch(Exception e) {
+			try {
+				response.sendRedirect("error");
+			} catch(Exception error) {
+				echo("<tr><td><hr />Exception occured.\n" + error.getMessage() + "</td></tr>");
+			}
+		}
+	}
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AbstractStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AbstractStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AbstractStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AbstractStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,84 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.ws.commons.om.OMAbstractFactory;
+import org.apache.ws.commons.om.OMFactory;
+import org.apache.ws.commons.om.OMNamespace;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+public class AbstractStub {
+
+
+	public OMElement getMethod(String name, String[] args) {
+
+		OMFactory fac = OMAbstractFactory.getOMFactory();
+		OMNamespace omNs = fac.createOMNamespace("management.console.web", "management");
+		OMElement method = fac.createOMElement(name, omNs);
+
+		for(int i = 0; i<args.length; i++) {
+			OMElement argument = fac.createOMElement("Argument", omNs);
+			argument.addChild(fac.createText(argument, args[i]));
+			method.addChild(argument);
+		}
+
+		return method;
+	}
+
+
+	public String unpackValue(OMElement element) {
+
+		element.build();
+		element.detach();
+
+		ArrayList resultList = new ArrayList();
+		OMElement value = element.getFirstElement();
+
+		return value.getText();
+	}	
+
+
+	public String[] unpackValues(OMElement element) {
+
+		element.build();
+		element.detach();
+
+		ArrayList resultList = new ArrayList();
+		Iterator iterator = element.getChildren();
+
+		while(iterator.hasNext()) {
+			OMElement value = (OMElement)iterator.next();
+			resultList.add(value.getText());
+		}
+
+		String[] results = (String[])resultList.toArray(new String[resultList.size()]);
+		return results;
+	}
+	
+	
+	public OMElement invoke(EndpointReference targetEPR, OMElement method) {
+		
+		OMElement result = null;
+		
+		try {
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+	
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+		
+		return result;
+	}
+
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisDynamicStatsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisDynamicStatsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisDynamicStatsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisDynamicStatsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,26 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisDynamicStatsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisDynamicStatsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisDynamicStats");
+	}
+
+	
+	public String[] getMonitoredData() {
+		
+		OMElement method = getMethod("getMonitoredData", new String[]{});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}		
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisGlobalsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisGlobalsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisGlobalsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisGlobalsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,253 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisGlobalsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisGlobalsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisGlobals");
+	}
+
+
+	public String[] getGlobalParameters() {
+
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getGlobalParameters", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+
+
+	public String editGlobalParameter(String name, String value) {
+	
+		OMElement result = null;
+
+		try {
+			OMElement method = getMethod("editGlobalParameter", new String[]{name, value});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+
+	}
+	
+	
+	// Services
+	
+	public String[] getServices() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getServices", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getServiceGroups() {
+		
+		OMElement method = getMethod("getServiceGroups", new String[]{});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getFaultyServices() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getFaultyServices", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String removeService(String name) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("removeService", new String[]{name});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+	
+	// Modules
+	
+	public String[] getModules() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getModules", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getGloballyEngagedModules() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getGloballyEngagedModules", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String engageModuleGlobally(String module) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("engageModuleGlabally", new String[]{module});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+	
+	// Transports
+	
+	public String[] getTransportIns() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getTransportIns", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getTransportOuts() {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getTransportOuts", new String[]{});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisModulesStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisModulesStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisModulesStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisModulesStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,128 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisModulesStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisModulesStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisModules");
+	}
+	
+	
+	public String isEngagedGlobally(String moduleName) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("isEngagedGlobally", new String[]{moduleName});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+	
+	public String[] getEngagedServices(String moduleName) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getEngagedServices", new String[]{moduleName});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getEngagedOperations(String moduleName) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getEngagedOperations", new String[]{moduleName});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getModuleParameters(String name) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getModuleParameters", new String[]{name});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+
+	
+	public String editModuleParameter(String moduleName, String parameterName, String parameterValue) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("editModuleParameter", new String[]{moduleName, parameterName, parameterValue});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationStatsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationStatsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationStatsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationStatsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,42 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisOperationStatsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisOperationStatsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisOperationStats");
+	}
+	
+	
+	public void setOperationToMonitor(String serviceName, String operationName) {
+		
+		OMElement method = getMethod("setOperationToMonitor", new String[]{serviceName, operationName});
+		invoke(targetEPR, method);
+	}
+
+	
+	public String getInMessages() {
+		
+		OMElement method = getMethod("getInMessages", new String[]{});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValue(result);
+	}	
+	
+	
+	public void clearInMessages() {
+		
+		OMElement method = getMethod("clearInMessages", new String[]{});
+		invoke(targetEPR, method);
+	}
+	
+	
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisOperationsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,108 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisOperationsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisOperationsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisOperations");
+	}
+		
+	
+	public String[] getOperationParameters(String service, String operation) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getOperationParameters", new String[]{service, operation});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+
+	
+	public String editOperationParameter(String serviceName, String opName, String parameterName, String parameterValue) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("editOperationParameter", new String[]{serviceName, opName, parameterName, parameterValue});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+	
+	// Modules
+	
+	public String[] getOperationEngagedModules(String serviceName, String opName) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getOperationEngagedModules", new String[]{serviceName, opName});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String engageModuleToOperation(String module, String service, String operation) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("engageModuleToOperation", new String[]{module, service, operation});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceGroupsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceGroupsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceGroupsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceGroupsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,44 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisServiceGroupsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisServiceGroupsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisServiceGroups");
+	}
+	
+	
+	public String[] getServices(String name) {
+		
+		OMElement method = getMethod("getServices", new String[]{name});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}
+	
+	
+	public String[] getServiceGroupEngagedModules(String serviceGroupName) {
+		
+		OMElement method = getMethod("getServiceGroupEngagedModules", new String[]{serviceGroupName});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}
+		
+	
+	public String engageModuleToServiceGroup(String moduleName, String serviceGroupName) {
+		
+		OMElement method = getMethod("engageModuleToServiceGroup", new String[]{moduleName, serviceGroupName});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValue(result);
+	}
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceStatsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceStatsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceStatsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServiceStatsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,40 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisServiceStatsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisServiceStatsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisServiceStats");
+	}
+	
+	
+	public void setServiceToMonitor(String serviceName) {
+		
+		OMElement method = getMethod("setServiceToMonitor", new String[]{serviceName});
+		invoke(targetEPR, method);
+	}
+
+	
+	public String getInMessages() {
+		
+		OMElement method = getMethod("getInMessages", new String[]{});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValue(result);
+	}	
+	
+	
+	public void clearInMessages() {
+		
+		OMElement method = getMethod("clearInMessages", new String[]{});
+		invoke(targetEPR, method);
+	}
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServicesStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServicesStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServicesStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisServicesStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,132 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisServicesStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisServicesStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisServices");
+	}
+
+	
+	public String[] getServiceParameters(String name) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getServiceParameters", new String[]{name});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+
+	
+	public String editServiceParameter(String serviceName, String parameterName, String parameterValue) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("editServiceParameter", new String[]{serviceName, parameterName, parameterValue});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+	
+	// Operations
+	
+	public String[] getOperations(String service) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getOperations", new String[]{service});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	// Modules
+	
+	public String[] getServiceEngagedModules(String serviceName) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("getServiceEngagedModules", new String[]{serviceName});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValues(result);
+	}
+	
+	
+	public String engageModuleToService(String module, String service) {
+		
+		OMElement result = null;
+		
+		try {
+			OMElement method = getMethod("engageModuleToService", new String[]{module, service});
+
+			Options options = new Options();
+			options.setTo(targetEPR);
+			options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+			ServiceClient client = new ServiceClient();
+			client.setOptions(options);
+			result = client.sendReceive(method);
+		} catch(Exception e) {
+			e.printStackTrace();
+		}
+
+		return unpackValue(result);
+	}
+	
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisTransportsStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisTransportsStub.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisTransportsStub.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/console/web/stubs/AxisTransportsStub.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,54 @@
+package org.apache.axis2.management.console.web.stubs;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.ws.commons.om.OMElement;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.client.Options;
+
+public class AxisTransportsStub extends AbstractStub {
+
+	private EndpointReference targetEPR = null;
+
+
+	public AxisTransportsStub(String host) {
+		targetEPR = new EndpointReference(host+"/services/AxisTransports");
+	}
+	
+	
+	public String[] getTransportInParameters(String name) {
+		
+		OMElement method = getMethod("getTransportInParameters", new String[]{name});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}
+	
+	
+	public String editTransportInParameter(String transportInName, String parameterName, String parameterValue) {
+		
+		OMElement method = getMethod("editTransportInParameter", new String[]{transportInName, parameterName, parameterValue});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValue(result);
+	}
+		
+	
+	public String[] getTransportOutParameters(String name) {
+		
+		OMElement method = getMethod("getTransportOutParameters", new String[]{name});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValues(result);
+	}
+	
+	
+	public String editTransportOutParameter(String transportOutName, String parameterName, String parameterValue) {
+		
+		OMElement method = getMethod("editTransportOutParameter", new String[]{transportOutName, parameterName, parameterValue});
+		OMElement result = invoke(targetEPR, method);
+			
+		return unpackValue(result);
+	}
+	
+}
\ No newline at end of file

Added: webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/core/admin/DMAdmin.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/core/admin/DMAdmin.java?rev=384160&view=auto
==============================================================================
--- webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/core/admin/DMAdmin.java (added)
+++ webservices/axis2/trunk/archive/java/scratch/Axis_Management_module/management/src/org/apache/axis2/management/core/admin/DMAdmin.java Wed Mar  8 01:01:46 2006
@@ -0,0 +1,45 @@
+package org.apache.axis2.management.core.admin;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.AxisFault;
+
+import org.apache.axis2.management.core.managers.GlobalManager;
+import org.apache.axis2.management.core.managers.ModuleManager;
+import org.apache.axis2.management.core.managers.TransportManager;
+import org.apache.axis2.management.core.managers.ServiceGroupManager;
+import org.apache.axis2.management.core.managers.ServiceManager;
+import org.apache.axis2.management.core.managers.OperationManager;
+import org.apache.axis2.management.core.managers.DynamicStatsManager;
+
+public class DMAdmin {
+
+	public void initManagement(ConfigurationContext configContext) {
+
+		System.out.println("Initiating management objects...");
+		
+		GlobalManager globalManager = new GlobalManager(configContext);
+		configContext.setProperty("global_manager", globalManager);
+		
+		ModuleManager moduleManager = new ModuleManager(configContext);
+		configContext.setProperty("module_manager", moduleManager);
+		
+		TransportManager transportManager = new TransportManager(configContext);
+		configContext.setProperty("transport_manager", transportManager);
+		
+		ServiceGroupManager serviceGroupManager = new ServiceGroupManager(configContext);
+		configContext.setProperty("servicegroup_manager", serviceGroupManager);
+		
+		ServiceManager serviceManager = new ServiceManager(configContext);
+		configContext.setProperty("service_manager", serviceManager);
+		
+		OperationManager operationManager = new OperationManager(configContext);
+		configContext.setProperty("operation_manager", operationManager);
+
+		DynamicStatsManager dynamicStatsManager = new DynamicStatsManager(configContext);
+		configContext.setProperty("dynamic_stats", dynamicStatsManager);
+		
+		System.out.println("Initiating management objects completed.");
+
+	}
+
+}
\ No newline at end of file



Mime
View raw message