axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r395562 [1/2] - in /webservices/axis2/trunk/java: ./ modules/core/ modules/core/src/org/apache/axis2/ modules/core/src/org/apache/axis2/deployment/ modules/core/src/org/apache/axis2/transport/http/ modules/saaj/test/org/apache/axis2/saaj/in...
Date Thu, 20 Apr 2006 11:16:17 GMT
Author: deepal
Date: Thu Apr 20 04:16:13 2006
New Revision: 395562

URL: http://svn.apache.org/viewcvs?rev=395562&view=rev
Log:
-fixing sample after default enabling of mtom
- applied Jens Schumanns path
   That was a great patch and I think we should handle over maintainability  of web admin module to Jens , since he can do that in very good manner. 
 

Added:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java
Modified:
    webservices/axis2/trunk/java/maven.xml
    webservices/axis2/trunk/java/modules/core/project.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisAdminServlet.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
    webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
    webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp
    webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp
    webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp
    webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp
    webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp
    webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp
    webservices/axis2/trunk/java/modules/webapp/Login.jsp
    webservices/axis2/trunk/java/modules/webapp/SelectService.jsp
    webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp
    webservices/axis2/trunk/java/modules/webapp/admin.jsp
    webservices/axis2/trunk/java/modules/webapp/conf/web.xml
    webservices/axis2/trunk/java/modules/webapp/engagingglobally.jsp
    webservices/axis2/trunk/java/modules/webapp/engagingtoanoperation.jsp
    webservices/axis2/trunk/java/modules/webapp/engagingtoaservice.jsp
    webservices/axis2/trunk/java/modules/webapp/include/adminheader.inc
    webservices/axis2/trunk/java/modules/webapp/include/adminheader.jsp
    webservices/axis2/trunk/java/modules/webapp/include/header.inc
    webservices/axis2/trunk/java/modules/webapp/include/link-footer.jsp
    webservices/axis2/trunk/java/modules/webapp/index.jsp
    webservices/axis2/trunk/java/modules/webapp/listGroupService.jsp
    webservices/axis2/trunk/java/modules/webapp/listServices.jsp
    webservices/axis2/trunk/java/modules/webapp/listSingleService.jsp
    webservices/axis2/trunk/java/modules/webapp/project.xml
    webservices/axis2/trunk/java/modules/webapp/upload.jsp

Modified: webservices/axis2/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/maven.xml?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/maven.xml (original)
+++ webservices/axis2/trunk/java/maven.xml Thu Apr 20 04:16:13 2006
@@ -430,16 +430,23 @@
         <ant:copy toDir="target/temp/war/toWEB-INF/conf">
             <ant:fileset file="modules/core/conf/axis2.xml"/>
         </ant:copy>
-
-
-        <ant:war destfile="target/dist/axis2.war"
-                 webxml="modules/webapp/conf/web.xml">
+        <ant:copy toDir="target/temp/war/axis2-web">
             <ant:fileset dir="modules/webapp">
                 <ant:exclude name="project.xml"/>
                 <ant:exclude name="**/*.iml"/>
                 <ant:exclude name="**/.*"/>
                 <ant:exclude name="**/conf/**"/>
             </ant:fileset>
+        </ant:copy>
+
+        <ant:war destfile="target/dist/axis2.war"
+                 webxml="modules/webapp/conf/web.xml">
+            <!--<ant:fileset dir="modules/webapp">-->
+                <!--<ant:exclude name="project.xml"/>-->
+                <!--<ant:exclude name="**/*.iml"/>-->
+                <!--<ant:exclude name="**/.*"/>-->
+                <!--<ant:exclude name="**/conf/**"/>-->
+            <!--</ant:fileset>-->
             <ant:lib dir="target/temp/war/lib">
                 <ant:include name="**"/>
                 <ant:exclude name="**servlet**"/>
@@ -457,6 +464,9 @@
                 <ant:include name="*.xml"/>
             </ant:webinf> -->
             <ant:webinf dir="target/temp/war/toWEB-INF"/>
+            <ant:fileset dir="target/temp/war">
+              <ant:include name="**/axis2-web/**" />
+            </ant:fileset>
         </ant:war>
     </goal>
 

Modified: webservices/axis2/trunk/java/modules/core/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/project.xml?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/project.xml (original)
+++ webservices/axis2/trunk/java/modules/core/project.xml Thu Apr 20 04:16:13 2006
@@ -106,6 +106,14 @@
                 <module>true</module>
             </properties>
         </dependency>
+       <dependency>
+          <groupId>commons-fileupload</groupId>
+          <artifactId>commons-fileupload</artifactId>
+          <version>${commons.fileupload.version}</version>
+          <properties>
+              <module>true</module>
+          </properties>
+       </dependency>      
         <!--added this to support to keep WSDL information in AxisService-->
          <dependency>
             <groupId>ws-commons</groupId>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Thu Apr 20 04:16:13 2006
@@ -121,6 +121,7 @@
     public static final String EDIR_SERVICE_PARA = "editServicepara";
     public static final String VIEW_SERVICE_HANDLERS = "viewServiceHandlers";
     public static final String USER_NAME = "userName";
+    public static final String ADMIN_SECURITY_DISABLED = "disableAdminSecurity";
 
     /**
      * Field SINGLE_SERVICE
@@ -139,7 +140,7 @@
     public static final String OPERATION_MAP = "operationmap";
     public static final String MODULE_MAP = "modulemap";
     public static final String MODULE_ADDRESSING = "addressing";
-    public static final String LIST_SERVICE_GROUPS = "listServciceGroups";
+    public static final String LIST_SERVICE_GROUPS = "listServiceGroups";
     public static final String LIST_OPERATIONS_FOR_THE_SERVICE = "listOperations";
     public static final String IS_FAULTY = "Fault";
     public static final String GLOBAL_HANDLERS = "axisconfig";

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml Thu Apr 20 04:16:13 2006
@@ -4,7 +4,7 @@
     <!-- ================================================= -->
     <parameter name="hotdeployment" locked="false">true</parameter>
     <parameter name="hotupdate" locked="false">false</parameter>
-    <parameter name="enableMTOM" locked="false">true</parameter>
+    <parameter name="enableMTOM" locked="false">false</parameter>
     <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
 
     <!-- Uncomment this to enable REST support -->

Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java?rev=395562&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AbstractAgent.java Thu Apr 20 04:16:13 2006
@@ -0,0 +1,105 @@
+package org.apache.axis2.transport.http;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Jens Schumann - OpenKnowledge GmbH
+ * @version $Id$
+ */
+public class AbstractAgent {
+  private static final Log log = LogFactory.getLog(AbstractAgent.class);
+
+  protected Map operationCache = new HashMap();
+  protected ConfigurationContext configContext;
+
+  public AbstractAgent(ConfigurationContext aConfigContext) {
+    configContext = aConfigContext;
+    preloadMethods();
+  }
+
+
+  public void handle(HttpServletRequest httpServletRequest,
+                     HttpServletResponse httpServletResponse)
+    throws IOException, Exception {
+
+
+    String requestURI = httpServletRequest.getRequestURI();
+
+    String operation;
+    int i = requestURI.lastIndexOf('/');
+    if (i < 0) {
+      processUnknown(httpServletRequest, httpServletResponse);
+      return;
+    } else if (i == requestURI.length()-1) {
+      processIndex(httpServletRequest, httpServletResponse);
+      return;
+    } else {
+      operation = requestURI.substring(i + 1);
+    }
+
+
+    Method method = (Method) operationCache.get(operation.toLowerCase());
+    if (method != null) {
+      method.invoke(this, new Object[]{httpServletRequest, httpServletResponse});
+    } else {
+      processUnknown(httpServletRequest, httpServletResponse);
+    }
+  }
+
+  protected void processIndex(HttpServletRequest httpServletRequest,
+                              HttpServletResponse httpServletResponse) throws IOException, ServletException {
+    renderView("index.jsp", httpServletRequest, httpServletResponse);
+  }
+
+  protected void processUnknown(HttpServletRequest httpServletRequest,
+                                HttpServletResponse httpServletResponse) throws IOException, ServletException {
+    httpServletResponse.sendError(HttpServletResponse.SC_NOT_FOUND, httpServletRequest.getRequestURI());
+  }
+
+
+  protected void renderView(String jspName,
+                            HttpServletRequest httpServletRequest,
+                            HttpServletResponse httpServletResponse) throws IOException, ServletException {
+    httpServletRequest.getRequestDispatcher("/axis2-web/" + jspName).include(httpServletRequest, httpServletResponse);
+
+  }
+
+  private void preloadMethods() {
+    List allMethods = new ArrayList();
+    allMethods.addAll(Arrays.asList(getClass().getDeclaredMethods()));
+    Class clazz = getClass().getSuperclass();
+    while (clazz != null && !clazz.equals(Object.class)) {
+      allMethods.addAll(Arrays.asList(clazz.getDeclaredMethods()));
+      clazz = clazz.getSuperclass();
+    }
+
+    for (int i = 0; i < allMethods.size(); i++) {
+      Method method = (Method) allMethods.get(i);
+
+      Class[] parameterTypes = method.getParameterTypes();
+      if (method.getName().startsWith("process") &&
+        parameterTypes.length == 2 &&
+        parameterTypes[0].equals(HttpServletRequest.class) &&
+        parameterTypes[1].equals(HttpServletResponse.class)) {
+        String key = method.getName().substring(7).toLowerCase();
+
+        if (!operationCache.containsKey(key)) {
+          operationCache.put(key, method);
+        }
+      }
+    }
+  }
+}

Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java?rev=395562&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AdminAgent.java Thu Apr 20 04:16:13 2006
@@ -0,0 +1,521 @@
+package org.apache.axis2.transport.http;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.deployment.util.PhasesInfo;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.commons.fileupload.DiskFileUpload;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileUpload;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author Jens Schumann - OpenKnowledge GmbH
+ * @version $Id$
+ */
+public class AdminAgent extends AbstractAgent {
+
+  /**
+   * Field LIST_MULTIPLE_SERVICE_JSP_NAME
+   */
+  private static final String LIST_SERVICE_GROUP_JSP = "ListServiceGroup.jsp";
+  private static final String LIST_SERVICES_JSP_NAME = "listService.jsp";
+  private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
+  private static final String IN_ACTIVATE_SERVICE_JSP_NAME = "InActivateService.jsp";
+  private static final String ACTIVATE_SERVICE_JSP_NAME = "ActivateService.jsp";
+
+  /**
+   * Field LIST_SINGLE_SERVICE_JSP_NAME
+   */
+  private static final String LIST_PHASES_JSP_NAME = "viewphases.jsp";
+  private static final String LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME = "globalModules.jsp";
+  private static final String LIST_AVAILABLE_MODULES_JSP_NAME = "listModules.jsp";
+  private static final String ENGAGING_MODULE_TO_SERVICE_JSP_NAME = "engagingtoaservice.jsp";
+  private static final String ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME = "EngageToServiceGroup.jsp";
+  private static final String ENGAGING_MODULE_GLOBALLY_JSP_NAME = "engagingglobally.jsp";
+  public static final String ADMIN_JSP_NAME = "admin.jsp";
+  private static final String VIEW_GLOBAL_HANDLERS_JSP_NAME = "ViewGlobalHandlers.jsp";
+  private static final String VIEW_SERVICE_HANDLERS_JSP_NAME = "ViewServiceHandlers.jsp";
+  private static final String SERVICE_PARA_EDIT_JSP_NAME = "ServiceParaEdit.jsp";
+  private static final String ENGAGE_TO_OPERATION_JSP_NAME = "engagingtoanoperation.jsp";
+
+
+  public AdminAgent(ConfigurationContext aConfigContext) {
+    super(aConfigContext);
+  }
+
+
+  protected void processIndex(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    renderView(ADMIN_JSP_NAME, req, res);
+  }
+
+
+  public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, Exception {
+    // TODO Fix workaround for login test
+    if (axisSecurityEnabled() && authorizationRequired(httpServletRequest)) {
+      renderView("Login.jsp", httpServletRequest, httpServletResponse);
+    } else {
+      super.handle(httpServletRequest, httpServletResponse);
+    }
+
+  }
+
+  protected void processUpload(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+
+    boolean isMultipart = FileUpload.isMultipartContent(req);
+    if (isMultipart) {
+      File repoDir = new File(configContext.getAxisConfiguration().getRepository().getFile());
+      File serviceDir = new File(repoDir, "services");
+
+      if (!serviceDir.exists()) {
+        serviceDir.mkdirs();
+      }
+
+      try {
+        // Create a new file upload handler
+        DiskFileUpload upload = new DiskFileUpload();
+
+        List items = upload.parseRequest(req);
+
+        // Process the uploaded items
+        Iterator iter = items.iterator();
+        while (iter.hasNext()) {
+          FileItem item = (FileItem) iter.next();
+
+          if (!item.isFormField()) {
+
+            String fileName = item.getName();
+            String fileExtesion = fileName;
+            fileExtesion = fileExtesion.toLowerCase();
+            if (!(fileExtesion.endsWith(".jar") || fileExtesion.endsWith(".aar"))) {
+              req.setAttribute("status", "failure");
+              req.setAttribute("cause", "Unsupported file type " + fileExtesion);
+            } else {
+
+              String fileNameOnly = "";
+              if (fileName.indexOf("\\") < 0) {
+                fileNameOnly = fileName.substring(fileName.lastIndexOf("/") + 1, fileName.length());
+              } else {
+                fileNameOnly = fileName.substring(fileName.lastIndexOf("\\") + 1, fileName.length());
+              }
+
+
+              File uploadedFile = new File(serviceDir, fileNameOnly);
+              item.write(uploadedFile);
+              req.setAttribute("status", "success");
+              req.setAttribute("filename", fileNameOnly);
+            }
+          }
+        }
+      } catch (Exception e) {
+        req.setAttribute("status", "failure");
+        req.setAttribute("cause", e.getMessage());
+
+      }
+    }
+
+    renderView("upload.jsp", req, res);
+  }
+
+
+  protected void processLogin(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    String username = req.getParameter("userName");
+    String password = req.getParameter("password");
+
+    if ((username == null) || (password == null) || username.trim().equals("")
+      || password.trim().equals("")) {
+      // todo SET ERROR MESSAGE
+      renderView("Login.jsp", req, res);
+    }
+
+    String adminUserName = (String) configContext.getAxisConfiguration().getParameter(
+      Constants.USER_NAME).getValue();
+    String adminPassword = (String) configContext.getAxisConfiguration().getParameter(
+      Constants.PASSWORD).getValue();
+
+    if (username.equals(adminUserName) && password.equals(adminPassword)) {
+      req.getSession().setAttribute(Constants.LOGGED, "Yes");
+      renderView(ADMIN_JSP_NAME, req, res);
+    } else {
+      // todo SET ERROR MESSAGE
+      renderView("Login.jsp", req, res);
+      //throw new AdminAppException(Messages.getMessage("invaliduser"));
+    }
+  }
+
+  protected void processEditServicePara(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    if (req.getParameter("editServicepara") != null) {
+      String serviceName = req.getParameter("axisService");
+      AxisService service = configContext.getAxisConfiguration().getService(serviceName);
+
+      if (service != null) {
+        ArrayList service_para = service.getParameters();
+
+        for (int i = 0; i < service_para.size(); i++) {
+          Parameter parameter = (Parameter) service_para.get(i);
+          String para = req.getParameter(serviceName + "_" + parameter.getName());
+
+          service.addParameter(new Parameter(parameter.getName(), para));
+        }
+
+        for (Iterator iterator = service.getOperations(); iterator.hasNext();) {
+          AxisOperation axisOperation = (AxisOperation) iterator.next();
+          String op_name = axisOperation.getName().getLocalPart();
+          ArrayList operation_para = axisOperation.getParameters();
+
+          for (int i = 0; i < operation_para.size(); i++) {
+            Parameter parameter = (Parameter) operation_para.get(i);
+            String para = req.getParameter(op_name + "_" + parameter.getName());
+
+            axisOperation.addParameter(new Parameter(parameter.getName(), para));
+          }
+        }
+      }
+
+      res.setContentType("text/css");
+
+      PrintWriter out_writer = new PrintWriter(res.getOutputStream());
+
+      out_writer.println("Parameters  changed Successfully");
+      out_writer.flush();
+      out_writer.close();
+      req.getSession().removeAttribute(Constants.SERVICE);
+
+      return;
+    } else {
+      String service = req.getParameter("axisService");
+
+      if (service != null) {
+        req.getSession().setAttribute(
+          Constants.SERVICE, configContext.getAxisConfiguration().getService(service));
+      }
+    }
+
+    renderView(SERVICE_PARA_EDIT_JSP_NAME, req, res);
+  }
+
+
+  protected void processEngagingGlobally(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    HashMap modules = configContext.getAxisConfiguration().getModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+
+    String moduleName = req.getParameter("modules");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+
+    if (moduleName != null) {
+      try {
+        configContext.getAxisConfiguration().engageModule(new QName(moduleName));
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS,
+          moduleName + " module engaged globally Successfully");
+      } catch (AxisFault axisFault) {
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
+      }
+    }
+
+    req.getSession().setAttribute("modules", null);
+    renderView(ENGAGING_MODULE_GLOBALLY_JSP_NAME, req, res);
+
+  }
+
+  protected void processListOperations(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap modules = configContext.getAxisConfiguration().getModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+
+    String moduleName = req.getParameter("modules");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+    req.getSession().setAttribute("modules", null);
+
+    String serviceName = req.getParameter("axisService");
+
+    if (serviceName != null) {
+      req.getSession().setAttribute("service", serviceName);
+    } else {
+      serviceName = (String) req.getSession().getAttribute("service");
+    }
+
+    req.getSession().setAttribute(
+      Constants.OPERATION_MAP,
+      configContext.getAxisConfiguration().getService(serviceName).getOperations());
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+
+    String operationName = req.getParameter("axisOperation");
+
+    if ((serviceName != null) && (moduleName != null) && (operationName != null)) {
+      try {
+        AxisOperation od = configContext.getAxisConfiguration().getService(
+          serviceName).getOperation(new QName(operationName));
+
+        od.engageModule(
+          configContext.getAxisConfiguration().getModule(new QName(moduleName)),
+          configContext.getAxisConfiguration());
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS,
+          moduleName
+            + " module engaged to the operation Successfully");
+      } catch (AxisFault axisFault) {
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
+      }
+    }
+
+    req.getSession().setAttribute("operation", null);
+    renderView(ENGAGE_TO_OPERATION_JSP_NAME, req, res);
+  }
+
+  protected void processEngageToService(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap modules = configContext.getAxisConfiguration().getModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+
+    String moduleName = req.getParameter("modules");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+    req.getSession().setAttribute("modules", null);
+
+    String serviceName = req.getParameter("service");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+
+    if ((serviceName != null) && (moduleName != null)) {
+      try {
+        configContext.getAxisConfiguration().getService(serviceName).engageModule(
+          configContext.getAxisConfiguration().getModule(new QName(moduleName)),
+          configContext.getAxisConfiguration());
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS,
+          moduleName
+            + " module engaged to the service Successfully");
+      } catch (AxisFault axisFault) {
+        req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
+      }
+    }
+
+    req.getSession().setAttribute("service", null);
+    renderView(ENGAGING_MODULE_TO_SERVICE_JSP_NAME, req, res);
+  }
+
+  protected void processEngageToServiceGroup(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap modules = configContext.getAxisConfiguration().getModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+
+    Iterator services = configContext.getAxisConfiguration().getServiceGroups();
+
+    req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, services);
+
+    String moduleName = req.getParameter("modules");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+    req.getSession().setAttribute("modules", null);
+
+    String serviceName = req.getParameter("service");
+
+    req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+
+    if ((serviceName != null) && (moduleName != null)) {
+      configContext.getAxisConfiguration().getServiceGroup(serviceName).engageModule(
+        configContext.getAxisConfiguration().getModule(new QName(moduleName)));
+      req.getSession().setAttribute(Constants.ENGAGE_STATUS,
+        moduleName
+          + " module engaged to the serviceGroup Successfully");
+    }
+
+    req.getSession().setAttribute("service", null);
+    renderView(ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME, req, res);
+  }
+
+
+  protected void processLogout(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    req.getSession().invalidate();
+    renderView("index.jsp", req, res);
+  }
+
+  protected void processSelectServiceParaEdit(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
+    renderView(SELECT_SERVICE_JSP_NAME, req, res);
+  }
+
+  protected void processListOperation(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
+
+    renderView(SELECT_SERVICE_JSP_NAME, req, res);
+  }
+
+  protected void processActivateService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    if (req.getParameter("submit") != null) {
+      String serviceName = req.getParameter("axisService");
+      String turnon = req.getParameter("turnon");
+      if (serviceName != null) {
+        if (turnon != null) {
+          AxisService service = configContext.getAxisConfiguration().getServiceForActivation(serviceName);
+          service.setActive(true);
+        }
+      }
+    } else {
+      HashMap services = configContext.getAxisConfiguration().getServices();
+      req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    }
+
+    renderView(ACTIVATE_SERVICE_JSP_NAME, req, res);
+  }
+
+  protected void processDeactivateService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    if (req.getParameter("submit") != null) {
+      String serviceName = req.getParameter("axisService");
+      String turnoff = req.getParameter("turnoff");
+      if (serviceName != null) {
+        if (turnoff != null) {
+          AxisService service = configContext.getAxisConfiguration().getService(serviceName);
+          service.setActive(false);
+        }
+      }
+    } else {
+      HashMap services = configContext.getAxisConfiguration().getServices();
+      req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    }
+
+    renderView(IN_ACTIVATE_SERVICE_JSP_NAME, req, res);
+  }
+
+
+  protected void processViewGlobalHandlers(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    req.getSession().setAttribute(Constants.GLOBAL_HANDLERS,
+      configContext.getAxisConfiguration());
+
+    renderView(VIEW_GLOBAL_HANDLERS_JSP_NAME, req, res);
+  }
+
+  protected void processViewServiceHandlers(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    String service = req.getParameter("axisService");
+
+    if (service != null) {
+      req.getSession().setAttribute(Constants.SERVICE_HANDLERS,
+        configContext.getAxisConfiguration().getService(service));
+    }
+
+    renderView(VIEW_SERVICE_HANDLERS_JSP_NAME, req, res);
+  }
+
+
+  protected void processListPhases(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    ArrayList phaselist = new ArrayList();
+
+    PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
+
+    phaselist.add(info.getINPhases());
+    phaselist.add(info.getIN_FaultPhases());
+    phaselist.add(info.getOUTPhases());
+    phaselist.add(info.getOUT_FaultPhases());
+    phaselist.add(info.getOperationInPhases());
+    phaselist.add(info.getOperationInFaultPhases());
+    phaselist.add(info.getOperationOutPhases());
+    phaselist.add(info.getOperationOutFaultPhases());
+    req.getSession().setAttribute(Constants.PHASE_LIST, phaselist);
+
+    renderView(LIST_PHASES_JSP_NAME, req, res);
+  }
+
+  protected void processListServiceGroups(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    Iterator serviceGroups = configContext.getAxisConfiguration().getServiceGroups();
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups);
+
+    renderView(LIST_SERVICE_GROUP_JSP, req, res);
+  }
+
+  protected void processListService(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
+      configContext.getAxisConfiguration().getFaultyServices());
+
+    renderView(LIST_SERVICES_JSP_NAME, req, res);
+  }
+
+  protected void processListContexts(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    req.getSession().setAttribute(Constants.CONFIG_CONTEXT, configContext);
+    renderView("ViewContexts.jsp", req, res);
+  }
+
+  protected void processglobalModules(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+    Collection modules = configContext.getAxisConfiguration().getEngagedModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+
+    renderView(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME, req, res);
+  }
+
+  protected void processListModules(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    HashMap modules = configContext.getAxisConfiguration().getModules();
+
+    req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+    req.getSession().setAttribute(Constants.ERROR_MODULE_MAP,
+      configContext.getAxisConfiguration().getFaultyModules());
+
+    renderView(LIST_AVAILABLE_MODULES_JSP_NAME, req, res);
+  }
+
+
+  protected void processSelectService(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
+
+    renderView(SELECT_SERVICE_JSP_NAME, req, res);
+  }
+
+
+  private boolean authorizationRequired(HttpServletRequest httpServletRequest) {
+    return httpServletRequest.getSession().getAttribute(Constants.LOGGED) == null &&
+    !httpServletRequest.getRequestURI().endsWith("login");
+  }
+
+  private boolean axisSecurityEnabled() {
+    Parameter parameter = configContext.getAxisConfiguration().getParameter(Constants.ADMIN_SECURITY_DISABLED);
+    return parameter == null || !"true".equals(parameter.getValue());
+  }
+
+}
+
+

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisAdminServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisAdminServlet.java?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisAdminServlet.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisAdminServlet.java Thu Apr 20 04:16:13 2006
@@ -25,16 +25,37 @@
 import java.io.IOException;
 
 /**
- * 
+ *
  */
 public class AxisAdminServlet extends AxisServlet {
 
-    protected void doGet(HttpServletRequest req,
+  protected transient AdminAgent agent;
+
+  protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
+    doGet(req, res);
+  }
+
+  protected void doGet(HttpServletRequest req,
                          HttpServletResponse resp) throws ServletException, IOException {
         try {
-            lister.handle(req, resp);
+            agent.handle(req, resp);
         } catch (Exception e) {
             throw new ServletException(e);
+        }
+    }
+
+    public void init(ServletConfig config) throws ServletException {
+        ServletContext servletContext = config.getServletContext();
+        this.configContext =
+                (ConfigurationContext) servletContext.getAttribute(CONFIGURATION_CONTEXT);
+        servletContext.setAttribute(this.getClass().getName(), this);
+        agent = new AdminAgent(configContext);
+        this.servletConfig = config;
+    }
+
+    public void init() throws ServletException {
+        if (this.servletConfig != null) {
+            init(this.servletConfig);
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java Thu Apr 20 04:16:13 2006
@@ -52,7 +52,6 @@
  */
 public class AxisServlet extends HttpServlet implements TransportListener {
 
-    protected transient ListingAgent lister;
     private Log log = LogFactory.getLog(getClass());
     private static final long serialVersionUID = -2085869393709833372L;
     public static final String CONFIGURATION_CONTEXT = "CONFIGURATION_CONTEXT";
@@ -62,6 +61,9 @@
 
     protected transient ServletConfig servletConfig;
 
+    private ListingAgent agent;
+
+
     protected MessageContext createAndSetInitialParamsToMsgCtxt(Object sessionContext,
                                                                 MessageContext msgContext, HttpServletResponse httpServletResponse,
                                                                 HttpServletRequest httpServletRequest)
@@ -94,6 +96,16 @@
     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
     */
 
+
+    protected void doGet(HttpServletRequest req,
+                         HttpServletResponse resp) throws ServletException, IOException {
+        try {
+            agent.handle(req, resp);
+        } catch (Exception e) {
+            throw new ServletException(e);
+        }
+    }
+
     /**
      * Method doPost
      *
@@ -170,8 +182,8 @@
                     new QName(Constants.TRANSPORT_HTTP));
             transportInDescription.setReceiver(this);
             listenerManager.addListener(transportInDescription, true);
-            lister = new ListingAgent(configContext);
             ListenerManager.defaultConfigurationContext = configContext;
+            agent = new ListingAgent(configContext);
         } catch (Exception e) {
             throw new ServletException(e);
         }
@@ -313,11 +325,4 @@
         return headerMap;
     }
 
-    protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
-         try {
-            lister.handle(httpServletRequest, httpServletResponse);
-        } catch (Exception e) {
-            throw new ServletException(e);
-        }
-    }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Thu Apr 20 04:16:13 2006
@@ -17,628 +17,106 @@
 
 package org.apache.axis2.transport.http;
 
-import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.transport.http.server.AdminAppException;
 
+import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 
-public class ListingAgent {
+public class ListingAgent extends AbstractAgent {
 
-    /**
-     * Field LIST_MULTIPLE_SERVICE_JSP_NAME
-     */
-    private static final String LIST_MULTIPLE_SERVICE_JSP_NAME = "listServices.jsp";
-    private static final String LIST_SERVICE_GROUP_JSP = "ListServiceGroup.jsp";
-    private static final String LIST_SERVICES_JSP_NAME = "listService.jsp";
-    private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
-    private static final String IN_ACTIVATE_SERVICE_JSP_NAME = "InActivateService.jsp";
-    private static final String ACTIVATE_SERVICE_JSP_NAME = "ActivateService.jsp";
-
-    /**
-     * Field LIST_SINGLE_SERVICE_JSP_NAME
-     */
-    private static final String LIST_SINGLE_SERVICE_JSP_NAME = "listSingleService.jsp";
-    private static final String LIST_PHASES_JSP_NAME = "viewphases.jsp";
-    private static final String LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME = "globalModules.jsp";
-    private static final String LIST_AVAILABLE_MODULES_JSP_NAME = "listModules.jsp";
-    private static final String ENGAGING_MODULE_TO_SERVICE_JSP_NAME =
-            "engagingtoaservice.jsp";
-    private static final String ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME =
-            "EngageToServiceGroup.jsp";
-    private static final String ENGAGING_MODULE_GLOBALLY_JSP_NAME = "engagingglobally.jsp";
-    public static final String ADMIN_JSP_NAME = "admin.jsp";
-    private static final String VIEW_GLOBAL_HANDLERS_JSP_NAME = "ViewGlobalHandlers.jsp";
-    private static final String VIEW_SERVICE_HANDLERS_JSP_NAME = "ViewServiceHandlers.jsp";
-    private static final String SERVICE_PARA_EDIT_JSP_NAME = "ServiceParaEdit.jsp";
-    private static final String ENGAGE_TO_OPERATION_JSP_NAME = "engagingtoanoperation.jsp";
-
-    /**
-     * Field allowListServices
-     */
-
-    /**
-     * Field allowListSingleService
-     */
-    private ConfigurationContext configContext;
-    public static final String RUNNING_PORT = "RUNNING_PORT";
+  /**
+   * Field LIST_MULTIPLE_SERVICE_JSP_NAME
+   */
+  private static final String LIST_MULTIPLE_SERVICE_JSP_NAME = "listServices.jsp";
+  private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
+
+  /**
+   * Field LIST_SINGLE_SERVICE_JSP_NAME
+   */
+  private static final String LIST_SINGLE_SERVICE_JSP_NAME = "listSingleService.jsp";
+
+  public static final String RUNNING_PORT = "RUNNING_PORT";
+
+  public ListingAgent(ConfigurationContext aConfigContext) {
+    super(aConfigContext);
+  }
+
+  public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
+    throws IOException, Exception {
+     if (httpServletRequest.getParameter("wsdl") != null || httpServletRequest.getParameter("xsd") != null) {
+       processListService(httpServletRequest, httpServletResponse);
+     } else {
+        super.handle(httpServletRequest, httpServletResponse);
+     }
+  }
+
+
+  protected void processIndex(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException, ServletException {
+    processListServices(httpServletRequest, httpServletResponse);
+  }
+
+  protected void processListService(HttpServletRequest req, HttpServletResponse res)
+    throws IOException, ServletException {
+
+    String filePart = req.getRequestURI();
+    String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1, filePart.length());
+    HashMap services = configContext.getAxisConfiguration().getServices();
+    String wsdl = req.getParameter("wsdl");
+    String xsd = req.getParameter("xsd");
+    if ((services != null) && !services.isEmpty()) {
+      Object serviceObj = services.get(serviceName);
+      if (serviceObj != null) {
+        if (wsdl != null) {
+          OutputStream out = res.getOutputStream();
+          res.setContentType("text/xml");
+          int ipindex = filePart.indexOf("//");
+          String ip = null;
+          if (ipindex >= 0) {
+            ip = filePart.substring(ipindex + 2, filePart.length());
+            int seperatorIndex = ip.indexOf(":");
+            int slashIndex = ip.indexOf("/");
+            String port = ip.substring(seperatorIndex + 1, slashIndex);
+            System.setProperty(RUNNING_PORT, port);
+            if (seperatorIndex > 0) {
+              ip = ip.substring(0, seperatorIndex);
+            }
+          }
+          ((AxisService) serviceObj).printWSDL(out, ip);
+          out.flush();
+          out.close();
+          return;
+        } else if (xsd != null) {
+          OutputStream out = res.getOutputStream();
+          res.setContentType("text/xml");
+          ((AxisService) serviceObj).printSchema(out);
+          out.flush();
+          out.close();
+          return;
+        } else {
+          req.getSession().setAttribute(Constants.SINGLE_SERVICE, serviceObj);
+        }
+      } else {
+        req.getSession().setAttribute(Constants.SINGLE_SERVICE, null);
+      }
+    }
+
+    renderView(LIST_SINGLE_SERVICE_JSP_NAME, req, res);
+  }
+
+  protected void processListServices(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
+    HashMap services = configContext.getAxisConfiguration().getServices();
+
+    req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+    req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
+      configContext.getAxisConfiguration().getFaultyServices());
 
-    public ListingAgent(ConfigurationContext configContext) {
-        this.configContext = configContext;
-    }
-
-    private void adminLogging(HttpServletRequest req, HttpServletResponse res)
-            throws AdminAppException, IOException {
-        String username = req.getParameter("userName");
-        String password = req.getParameter("password");
-
-        if ((username == null) || (password == null) || username.trim().equals("")
-                || password.trim().equals("")) {
-            throw new AdminAppException(Messages.getMessage("invaliduser"));
-        }
-
-        String adminUserName = (String) configContext.getAxisConfiguration().getParameter(
-                Constants.USER_NAME).getValue();
-        String adminPassword = (String) configContext.getAxisConfiguration().getParameter(
-                Constants.PASSWORD).getValue();
-
-        if (username.equals(adminUserName) && password.equals(adminPassword)) {
-            req.getSession().setAttribute(Constants.LOGGED, "Yes");
-            res.sendRedirect(ADMIN_JSP_NAME);
-        } else {
-            throw new AdminAppException(Messages.getMessage("invaliduser"));
-        }
-    }
-
-
-    private void validateUser(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        String logged = (String) req.getSession().getAttribute(Constants.LOGGED);
-        if (!(logged != null && "Yes".equals(logged))) {
-            res.setContentType("text/html");
-            PrintWriter writer = new PrintWriter(res.getOutputStream());
-            writer.write("<font color=\"red\">Invalid user , " +
-                    "you have to loging to system before performing this operation</font>");
-            writer.flush();
-        }
-    }
-
-    private void changeParameters(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        if (req.getParameter("editServicepara") != null) {
-            String serviceName = req.getParameter("axisService");
-            AxisService service = configContext.getAxisConfiguration().getService(serviceName);
-
-            if (service != null) {
-                ArrayList service_para = service.getParameters();
-
-                for (int i = 0; i < service_para.size(); i++) {
-                    Parameter parameter = (Parameter) service_para.get(i);
-                    String para = req.getParameter(serviceName + "_" + parameter.getName());
-
-                    service.addParameter(new Parameter(parameter.getName(), para));
-                }
-
-                for (Iterator iterator = service.getOperations(); iterator.hasNext();) {
-                    AxisOperation axisOperation = (AxisOperation) iterator.next();
-                    String op_name = axisOperation.getName().getLocalPart();
-                    ArrayList operation_para = axisOperation.getParameters();
-
-                    for (int i = 0; i < operation_para.size(); i++) {
-                        Parameter parameter = (Parameter) operation_para.get(i);
-                        String para = req.getParameter(op_name + "_" + parameter.getName());
-
-                        axisOperation.addParameter(new Parameter(parameter.getName(), para));
-                    }
-                }
-            }
-
-            res.setContentType("text/css");
-
-            PrintWriter out_writer = new PrintWriter(res.getOutputStream());
-
-            out_writer.println("Parameters  changed Successfully");
-            out_writer.flush();
-            out_writer.close();
-            req.getSession().removeAttribute(Constants.SERVICE);
-
-            return;
-        } else {
-            String service = req.getParameter("axisService");
-
-            if (service != null) {
-                req.getSession().setAttribute(
-                        Constants.SERVICE, configContext.getAxisConfiguration().getService(service));
-            }
-        }
-
-        res.sendRedirect(SERVICE_PARA_EDIT_JSP_NAME);
-    }
-
-    private void engageModulesGlobally(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap modules = configContext.getAxisConfiguration().getModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-
-        String moduleName = req.getParameter("modules");
-
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-
-        if (moduleName != null) {
-            try {
-                configContext.getAxisConfiguration().engageModule(new QName(moduleName));
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName + " module engaged globally Successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
-            }
-        }
-
-        req.getSession().setAttribute("modules", null);
-        res.sendRedirect(ENGAGING_MODULE_GLOBALLY_JSP_NAME);
-    }
-
-    private void engageModulesToOperation(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap modules = configContext.getAxisConfiguration().getModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-
-        String moduleName = req.getParameter("modules");
-
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-        req.getSession().setAttribute("modules", null);
-
-        String serviceName = req.getParameter("axisService");
-
-        if (serviceName != null) {
-            req.getSession().setAttribute("service", serviceName);
-        } else {
-            serviceName = (String) req.getSession().getAttribute("service");
-        }
-
-        req.getSession().setAttribute(
-                Constants.OPERATION_MAP,
-                configContext.getAxisConfiguration().getService(serviceName).getOperations());
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-
-        String operationName = req.getParameter("axisOperation");
-
-        if ((serviceName != null) && (moduleName != null) && (operationName != null)) {
-            try {
-                AxisOperation od = configContext.getAxisConfiguration().getService(
-                        serviceName).getOperation(new QName(operationName));
-
-                od.engageModule(
-                        configContext.getAxisConfiguration().getModule(new QName(moduleName)),
-                        configContext.getAxisConfiguration());
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName
-                                + " module engaged to the operation Successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
-            }
-        }
-
-        req.getSession().setAttribute("operation", null);
-        res.sendRedirect(ENGAGE_TO_OPERATION_JSP_NAME);
-    }
-
-    private void engageModulesToService(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap modules = configContext.getAxisConfiguration().getModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-
-        String moduleName = req.getParameter("modules");
-
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-        req.getSession().setAttribute("modules", null);
-
-        String serviceName = req.getParameter("service");
-
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-
-        if ((serviceName != null) && (moduleName != null)) {
-            try {
-                configContext.getAxisConfiguration().getService(serviceName).engageModule(
-                        configContext.getAxisConfiguration().getModule(new QName(moduleName)),
-                        configContext.getAxisConfiguration());
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                        moduleName
-                                + " module engaged to the service Successfully");
-            } catch (AxisFault axisFault) {
-                req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
-            }
-        }
-
-        req.getSession().setAttribute("service", null);
-        res.sendRedirect(ENGAGING_MODULE_TO_SERVICE_JSP_NAME);
-    }
-
-    private void engageModulesToServiceGroup(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap modules = configContext.getAxisConfiguration().getModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-
-        Iterator services = configContext.getAxisConfiguration().getServiceGroups();
-
-        req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, services);
-
-        String moduleName = req.getParameter("modules");
+    renderView(LIST_MULTIPLE_SERVICE_JSP_NAME, req, res);
+  }
 
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-        req.getSession().setAttribute("modules", null);
-
-        String serviceName = req.getParameter("service");
-
-        req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
-
-        if ((serviceName != null) && (moduleName != null)) {
-            configContext.getAxisConfiguration().getServiceGroup(serviceName).engageModule(
-                    configContext.getAxisConfiguration().getModule(new QName(moduleName)));
-            req.getSession().setAttribute(Constants.ENGAGE_STATUS,
-                    moduleName
-                            + " module engaged to the serviceGroup Successfully");
-        }
-
-        req.getSession().setAttribute("service", null);
-        res.sendRedirect(ENGAGING_MODULE_TO_SERVICE_GROUP_JSP_NAME);
-    }
-
-    public void handle(HttpServletRequest httpServletRequest,
-                       HttpServletResponse httpServletResponse)
-            throws IOException, Exception {
-
-        String filePart = httpServletRequest.getRequestURL().toString();
-
-        if ((filePart != null) && filePart.endsWith(Constants.ADMIN_LISTSERVICES)) {
-            listAdminServices(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.LIST_MODULES)) {
-            listModules(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null)
-                && filePart.endsWith(Constants.LIST_GLOABLLY_ENGAGED_MODULES)) {
-            listGloballyModules(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.LIST_PHASES)) {
-            listPhases(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.ENGAGE_GLOBAL_MODULE)) {
-            engageModulesGlobally(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.ENGAGE_MODULE_TO_SERVICE)) {
-            engageModulesToService(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null)
-                && filePart.endsWith(Constants.ENGAGE_MODULE_TO_SERVICE_GROUP)) {
-            engageModulesToServiceGroup(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.ADMIN_LOGIN)) {
-            adminLogging(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.VIEW_GLOBAL_HANDLERS)) {
-            viewGlobalHandlers(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.SELECT_SERVICE)) {
-            selectService(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.VIEW_SERVICE_HANDLERS)) {
-            viewServiceHandlers(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null)
-                && filePart.endsWith(Constants.LIST_SERVICE_FOR_MODULE_ENGAGEMENT)) {
-            lsitServiceformodules(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null)
-                && filePart.endsWith(Constants.LIST_OPERATIONS_FOR_THE_SERVICE)) {
-            engageModulesToOperation(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.IN_ACTIVATE_SERVICE)) {
-            inActivateService(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.ACTIVATE_SERVICE)) {
-            activateService(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null)
-                && filePart.endsWith(Constants.SELECT_SERVICE_FOR_PARA_EDIT)) {
-            lsitServiceforParameterChanged(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.EDIR_SERVICE_PARA)) {
-            changeParameters(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.LIST_SERVICE_GROUPS)) {
-            listServiceGroups(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.LIST_CONTEXTS)) {
-            listContexts(httpServletRequest, httpServletResponse);
-
-            return;
-        } else if ((filePart != null) && filePart.endsWith(Constants.LOGOUT)) {
-            logout(httpServletRequest, httpServletResponse);
-            return;
-        }
-
-        if ((filePart != null) && filePart.endsWith(Constants.LIST_SERVICES)) {
-            listServices(httpServletRequest, httpServletResponse);
-        } else {
-            listService(httpServletRequest, httpServletResponse, filePart);
-        }
-    }
-
-    /**
-     * @param req
-     * @param res
-     * @throws IOException
-     */
-    private void listAdminServices(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
-                configContext.getAxisConfiguration().getFaultyServices());
-        res.sendRedirect(LIST_SERVICES_JSP_NAME);
-    }
-
-    private void listContexts(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        validateUser(req, res);
-        req.getSession().setAttribute(Constants.CONFIG_CONTEXT, configContext);
-        res.sendRedirect("ViewContexts.jsp");
-    }
-
-    private void listGloballyModules(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        Collection modules = configContext.getAxisConfiguration().getEngagedModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-        res.sendRedirect(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME);
-    }
-
-    private void listModules(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        validateUser(req, res);
-        HashMap modules = configContext.getAxisConfiguration().getModules();
-
-        req.getSession().setAttribute(Constants.MODULE_MAP, modules);
-        req.getSession().setAttribute(Constants.ERROR_MODULE_MAP,
-                configContext.getAxisConfiguration().getFaultyModules());
-        res.sendRedirect(LIST_AVAILABLE_MODULES_JSP_NAME);
-    }
-
-    private void listPhases(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        validateUser(req, res);
-        ArrayList phaselist = new ArrayList();
-
-        PhasesInfo info = configContext.getAxisConfiguration().getPhasesInfo();
-
-        phaselist.add(info.getINPhases());
-        phaselist.add(info.getIN_FaultPhases());
-        phaselist.add(info.getOUTPhases());
-        phaselist.add(info.getOUT_FaultPhases());
-        phaselist.add(info.getOperationInPhases());
-        phaselist.add(info.getOperationInFaultPhases());
-        phaselist.add(info.getOperationOutPhases());
-        phaselist.add(info.getOperationOutFaultPhases());
-        req.getSession().setAttribute(Constants.PHASE_LIST, phaselist);
-        res.sendRedirect(LIST_PHASES_JSP_NAME);
-    }
-
-    /**
-     * Method listService
-     *
-     * @param req
-     * @param res
-     * @param filePart
-     * @throws IOException
-     */
-    private void listService(HttpServletRequest req, HttpServletResponse res, String filePart)
-            throws IOException {
-       OutputStream out = res.getOutputStream();
-        String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1, filePart.length());
-        HashMap services = configContext.getAxisConfiguration().getServices();
-        String wsdl = req.getParameter("wsdl");
-        String xsd = req.getParameter("xsd");
-        if ((services != null) && !services.isEmpty()) {
-            Object serviceObj = services.get(serviceName);
-            if (serviceObj != null) {
-                if (wsdl != null) {
-                    res.setContentType("text/xml");
-                    int ipindex = filePart.indexOf("//");
-                    String ip = null;
-                    if (ipindex >= 0) {
-                        ip = filePart.substring(ipindex + 2, filePart.length());
-                        int seperatorIndex = ip.indexOf(":");
-                        int slashIndex = ip.indexOf("/");
-                        String port = ip.substring(seperatorIndex + 1, slashIndex);
-                        System.setProperty(RUNNING_PORT, port);
-                        if (seperatorIndex > 0) {
-                            ip = ip.substring(0, seperatorIndex);
-                        }
-                    }
-                    ((AxisService) serviceObj).printWSDL(out, ip);
-                    out.flush();
-                    out.close();
-                    return;
-                } else if (xsd != null) {
-                    res.setContentType("text/xml");
-                    ((AxisService) serviceObj).printSchema(out);
-                    out.flush();
-                    out.close();
-                    return;
-                } else {
-                    req.getSession().setAttribute(Constants.SINGLE_SERVICE, serviceObj);
-                }
-            } else {
-                req.getSession().setAttribute(Constants.SINGLE_SERVICE, null);
-            }
-        }
-        String URI = req.getRequestURI();
-        URI = URI.substring(0, URI.indexOf("services"));
-        res.sendRedirect(URI + LIST_SINGLE_SERVICE_JSP_NAME);
-    }
-
-    private void listServiceGroups(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        Iterator serviceGroups = configContext.getAxisConfiguration().getServiceGroups();
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.SERVICE_GROUP_MAP, serviceGroups);
-        res.sendRedirect(LIST_SERVICE_GROUP_JSP);
-    }
-
-    /**
-     * Method listServices
-     *
-     * @param req
-     * @param res
-     * @throws IOException
-     */
-    private void listServices(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.ERROR_SERVICE_MAP,
-                configContext.getAxisConfiguration().getFaultyServices());
-        res.sendRedirect(LIST_MULTIPLE_SERVICE_JSP_NAME);
-    }
-
-    private void logout(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        req.getSession().invalidate();
-        res.sendRedirect("index.jsp");
-    }
-
-    private void lsitServiceforParameterChanged(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
-        res.sendRedirect(SELECT_SERVICE_JSP_NAME);
-    }
-
-    private void lsitServiceformodules(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
-        res.sendRedirect(SELECT_SERVICE_JSP_NAME);
-    }
-
-    private void activateService(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        validateUser(req, res);
-        if (req.getParameter("submit") != null) {
-            String serviceName = req.getParameter("axisService");
-            String turnon = req.getParameter("turnon");
-            if (serviceName != null) {
-                if (turnon != null) {
-                    AxisService service = configContext.getAxisConfiguration().getServiceForActivation(serviceName);
-                    service.setActive(true);
-                }
-            }
-        } else {
-            HashMap services = configContext.getAxisConfiguration().getServices();
-            req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        }
-
-        res.sendRedirect(ACTIVATE_SERVICE_JSP_NAME);
-    }
-
-    private void inActivateService(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        validateUser(req, res);
-        if (req.getParameter("submit") != null) {
-            String serviceName = req.getParameter("axisService");
-            String turnoff = req.getParameter("turnoff");
-            if (serviceName != null) {
-                if (turnoff != null) {
-                    AxisService service = configContext.getAxisConfiguration().getService(serviceName);
-                    service.setActive(false);
-                }
-            }
-        } else {
-            HashMap services = configContext.getAxisConfiguration().getServices();
-            req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        }
-
-        res.sendRedirect(IN_ACTIVATE_SERVICE_JSP_NAME);
-    }
-
-    private void selectService(HttpServletRequest req, HttpServletResponse res) throws IOException {
-        HashMap services = configContext.getAxisConfiguration().getServices();
-
-        req.getSession().setAttribute(Constants.SERVICE_MAP, services);
-        req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
-        res.sendRedirect(SELECT_SERVICE_JSP_NAME);
-    }
-
-    private void viewGlobalHandlers(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        req.getSession().setAttribute(Constants.GLOBAL_HANDLERS,
-                configContext.getAxisConfiguration());
-        res.sendRedirect(VIEW_GLOBAL_HANDLERS_JSP_NAME);
-    }
-
-    private void viewServiceHandlers(HttpServletRequest req, HttpServletResponse res)
-            throws IOException {
-        validateUser(req, res);
-        String service = req.getParameter("axisService");
-
-        if (service != null) {
-            req.getSession().setAttribute(Constants.SERVICE_HANDLERS,
-                    configContext.getAxisConfiguration().getService(service));
-        }
-
-        res.sendRedirect(VIEW_SERVICE_HANDLERS_JSP_NAME);
-    }
 }

Modified: webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java (original)
+++ webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java Thu Apr 20 04:16:13 2006
@@ -3,6 +3,7 @@
 import junit.framework.TestCase;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.util.Utils;
 
 import javax.activation.DataHandler;
@@ -49,6 +50,8 @@
 
     protected void setUp() throws Exception {
         UtilServer.start(SAAJ_REPO);
+        Parameter eneblemtom = new Parameter("enableMTOM","true");
+        UtilServer.getConfigurationContext().getAxisConfiguration().addParameter(eneblemtom);
         final AxisService service = Utils.createSimpleService(SERVICE_NAME,
                                                               EchoService.class.getName(),
                                                               OPERATION_NAME);

Modified: webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ActivateService.jsp Thu Apr 20 04:16:13 2006
@@ -6,7 +6,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Turn on Axis Service</h1>
-<form method="get" name="serviceActivate" action="activateService">
+<form method="get" name="serviceActivate" action="admin/activateService">
   <table width="100%"  border="0">
 <tr>
   <td colspan="2" >

Modified: webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/EngageToServiceGroup.jsp Thu Apr 20 04:16:13 2006
@@ -21,7 +21,7 @@
 		<p>No axisService groups are present to be engaged.</p>
 		<%} else {
 %>
-<form method="get" name="selectModuleForm" action="engageToServiceGroup">
+<form method="get" name="selectModuleForm" action="admin/engageToServiceGroup">
     <table border="0" width="100%" cellspacing="1" cellpadding="1">
         <tr>
             <td>Select a Module :</td>

Modified: webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/HappyAxis.jsp Thu Apr 20 04:16:13 2006
@@ -39,8 +39,9 @@
     */
 %>
 <head>
+    <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
     <title>Axis2 Happiness Page</title>
-    <link href="css/axis-style.css" rel="stylesheet" type="text/css">
+    <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
 </head>
 
 <body>
@@ -50,7 +51,9 @@
 <%IP = request.getRequestURL().toString();
     int lastindex = IP.lastIndexOf('/');
     IP = IP.substring(0, lastindex);
-    targetEPR = new EndpointReference(IP + "/services/version");
+    ///axis2/axis2-web/services/version
+    IP=  IP.replaceAll("axis2-web","");
+    targetEPR = new EndpointReference(IP + "services/version");
 %>
 <%!
     /*

Modified: webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/InActivateService.jsp Thu Apr 20 04:16:13 2006
@@ -6,7 +6,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Turn off Axis Service</h1>
-<form method="get" name="serviceInActivate" action="inActivateService">
+<form method="get" name="serviceInActivate" action="admin/deactivateService">
   <table width="100%"  border="0">
 <tr>
   <td colspan="2" >

Modified: webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/LeftFrame.jsp Thu Apr 20 04:16:13 2006
@@ -35,7 +35,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="upload.jsp">Upload Service</a>
+         <a href="admin/upload">Upload Service</a>
        </td>
     </tr>
 <tr>
@@ -43,11 +43,12 @@
       <b><nobr>System Components&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</nobr></b>
      </td>
   </tr>
+  <tr>
     <td>
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="listService">Available Services</a>
+      <a href="services/listServices">Available Services</a>
     </td>
  </tr>
  <tr>
@@ -55,7 +56,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="listServciceGroups">Available Service Groups</a>
+      <a href="admin/listServiceGroups">Available Service Groups</a>
     </td>
  </tr>
  <tr>
@@ -63,7 +64,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="listModules">Available Modules</a>
+      <a href="admin/listModules">Available Modules</a>
     </td>
  </tr>
  <tr>
@@ -71,7 +72,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td>
-      <a href="globalModules">Globally Engaged Modules</a>
+      <a href="admin/globalModules">Globally Engaged Modules</a>
     </td>
  </tr>
  <tr>
@@ -79,7 +80,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
     </td>
     <td >
-      <a href="listPhases">Available Phases</a>
+      <a href="admin/listPhases">Available Phases</a>
     </td>
  </tr>
   <tr>
@@ -92,7 +93,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="viewGlobalHandlers">Global Chains</a>
+         <a href="admin/viewGlobalHandlers">Global Chains</a>
        </td>
     </tr>
     <tr>
@@ -100,7 +101,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="selectService">Operation Specific Chains</a>
+         <a href="admin/selectService">Operation Specific Chains</a>
        </td>
     </tr>
     <tr>
@@ -113,7 +114,7 @@
         &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="engagingglobally">For all Services</a>
+         <a href="admin/engagingglobally">For all Services</a>
        </td>
     </tr>
      <tr>
@@ -121,7 +122,7 @@
          &nbsp;&nbsp;&nbsp;&nbsp;
         </td>
         <td>
-          <a href="engageToServiceGroup">For a Service Group</a>
+          <a href="admin/engageToServiceGroup">For a Service Group</a>
         </td>
      </tr>
 
@@ -131,7 +132,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="engageToService">For a Service</a>
+         <a href="admin/engageToService">For a Service</a>
        </td>
     </tr>
 
@@ -140,7 +141,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="listoperation">For an Operation</a>
+         <a href="admin/listOperation">For an Operation</a>
        </td>
     </tr>
 
@@ -154,7 +155,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="inActivateService">Inactivate Service</a>
+         <a href="admin/deactivateService">Inactivate Service</a>
        </td>
     </tr>
     <tr>
@@ -162,7 +163,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="activateService">Activate Service</a>
+         <a href="admin/activateService">Activate Service</a>
        </td>
     </tr>
     <tr>
@@ -170,7 +171,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="selectServiceParaEdit">Edit Parameters</a>
+         <a href="admin/selectServiceParaEdit">Edit Parameters</a>
        </td>
     </tr>
     <tr>
@@ -183,7 +184,7 @@
        &nbsp;&nbsp;&nbsp;&nbsp;
        </td>
        <td>
-         <a href="listContexts">View Hierarchy</a>
+         <a href="admin/listContexts">View Hierarchy</a>
        </td>
     </tr>
-</table>
\ No newline at end of file
+</table>

Modified: webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ListServiceGroup.jsp Thu Apr 20 04:16:13 2006
@@ -22,7 +22,7 @@
             AxisService axisService = (AxisService) axisServiceIter.next();
             String serviceName = axisService.getName();
     %>
-    <li><font color="blue"><a href="listGroupService.jsp?serviceName=<%=serviceName%>">
+    <li><font color="blue"><a href="admin/listService?serviceName=<%=serviceName%>">
         <%=serviceName%></a></font></li>
     <%
         }
@@ -43,4 +43,4 @@
         }
     }
 %>
-<jsp:include page="include/adminfooter.jsp"/>
\ No newline at end of file
+<jsp:include page="include/adminfooter.jsp"/>

Modified: webservices/axis2/trunk/java/modules/webapp/Login.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/Login.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/Login.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/Login.jsp Thu Apr 20 04:16:13 2006
@@ -1,5 +1,4 @@
-<%@ page import="org.apache.axis2.Constants"%>
-<%@ page import="org.apache.axis2.transport.http.ListingAgent"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%--
  /*
 * Copyright 2004,2005 The Apache Software Foundation.
@@ -25,65 +24,60 @@
 * Time: 7:14:26 PM
 */
 --%>
-<%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
-  <head><title>Login to Axis2:: Administartion page</title></head>
-<link href="css/axis-style.css" rel="stylesheet" type="text/css">
-  <body>
-  <jsp:include page="include/header.inc"></jsp:include>
-<jsp:include page="include/link-footer.jsp"></jsp:include>
-  <% String isLoged = (String)request.getSession().getAttribute(Constants.LOGGED);
-   if("Yes".equals(isLoged)){
-	response.sendRedirect(ListingAgent.ADMIN_JSP_NAME);
-   }
-%>
+<head>
+  <base href="<%= request.getScheme() %>://<%= request.getServerName() %>:<%= request.getServerPort()%><%= request.getContextPath() %>/" />
+  <title>Login to Axis2:: Administration page</title>
+  <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+<jsp:include page="include/header.inc" />
+<jsp:include page="include/link-footer.jsp" />
 <table class="FULL_BLANK">
-<tr><td valign="top">
-<%--<jsp:include page="happy_axis.jsp?type=min"></jsp:include>--%>
-
-</td>
-<td valign="middle" align="left">
-    <form method="get" name="LoginForm" action="adminlogin">
+  <tr><td valign="top">
+  </td>
+    <td valign="middle" align="left">
+      <form method="post" name="LoginForm" action="admin/login">
         <table class="LOG_IN_FORM">
-            <tr>
-                <td align="center" colspan="2" bgcolor="#b0b0b0" color="#FFFFFF"><font color="#FFFFFF">Login</font></td>
-             </tr>
-            <tr>
-                <td align="right">User         :</td>
-                <td> <INPUT align="left" TYPE=TEXT NAME="userName" tabindex="1">
-                </td>
-             </tr>
-             <tr>
-                <td align="right">Password     : </td>
-                <td><INPUT align="left" TYPE=PASSWORD NAME="password" tabindex="2">
-                </td>
-             </tr>
-             <tr>
-               <td colspan="2">
-                 <br>
-               </td>
-             </tr>
-             <tr>
-             <td align="right">
-                 <input  name="submit" type="submit" value=" Login  " >
-             </td>
-             <td align="left">
-                <input  name="cancel" type="reset" value=" Clear " >
-             </td>
-             </tr>
-         </table>
-       </form>
-<br/><br/><br/><br/><br/><br/>
-</td>
-</tr>
+          <tr>
+            <td align="center" colspan="2" bgcolor="#b0b0b0" color="#FFFFFF"><font color="#FFFFFF">Login</font></td>
+          </tr>
+          <tr>
+            <td align="right">User :</td>
+            <td><INPUT align="left" TYPE=TEXT NAME="userName" tabindex="1">
+            </td>
+          </tr>
+          <tr>
+            <td align="right">Password : </td>
+            <td><INPUT align="left" TYPE=PASSWORD NAME="password" tabindex="2">
+            </td>
+          </tr>
+          <tr>
+            <td colspan="2">
+              <br>
+            </td>
+          </tr>
+          <tr>
+            <td align="right">
+              <input name="submit" type="submit" value=" Login  ">
+            </td>
+            <td align="left">
+              <input name="cancel" type="reset" value=" Clear ">
+            </td>
+          </tr>
+        </table>
+      </form>
+      <br/><br/><br/><br/><br/><br/>
+    </td>
+  </tr>
 </table>
-  <jsp:include page="include/footer.inc"></jsp:include>
+<jsp:include page="include/footer.inc"/>
 <script language="JavaScript">
-<!--
-document.LoginForm.userName.focus();
-//-->
+  <!--
+  document.LoginForm.userName.focus();
+  //-->
 </script>
-     </body>
-  </html>
+</body>
+</html>
 
 

Modified: webservices/axis2/trunk/java/modules/webapp/SelectService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/SelectService.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/SelectService.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/SelectService.jsp Thu Apr 20 04:16:13 2006
@@ -56,7 +56,7 @@
   %>
 <h1><%=heading%></h1>
 <p><%=disc%></p>
-<form method="get" name="selectServiceForm" action="<%=action%>">
+<form method="get" name="selectServiceForm" action="admin/<%=action%>">
 <table border="0" width="50%" cellspacing="1" cellpadding="1">
          <tr>
         <td width="35%">Select a Service :</td><td width="65%">

Modified: webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/ServiceParaEdit.jsp Thu Apr 20 04:16:13 2006
@@ -7,7 +7,7 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Edit Service Parameters</h1>
-  <form method="get" name="editServicepara" action="editServicepara">
+  <form method="get" name="editServicepara" action="admin/editServicepara">
    <%
             AxisService axisService = (AxisService)request.getSession().
                     getAttribute(Constants.SERVICE);
@@ -90,4 +90,4 @@
 
        %>
        <form>
-<jsp:include page="include/adminfooter.jsp"></jsp:include>
\ No newline at end of file
+<jsp:include page="include/adminfooter.jsp"></jsp:include>

Modified: webservices/axis2/trunk/java/modules/webapp/admin.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/webapp/admin.jsp?rev=395562&r1=395561&r2=395562&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/admin.jsp (original)
+++ webservices/axis2/trunk/java/modules/webapp/admin.jsp Thu Apr 20 04:16:13 2006
@@ -1,5 +1,5 @@
-<%@ page import="org.apache.axis2.Constants"%>        <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-        <%
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%
            /*
 * Copyright 2004,2005 The Apache Software Foundation.
 *
@@ -23,14 +23,8 @@
  * Date: May 26, 2005
  * Time: 7:14:26 PM
  */
-        %>
-  <%
-      String status = (String)request.getSession().getAttribute(Constants.LOGGED);
-      if(status == null || (! status.equals("Yes"))) {
-          throw new Exception("Invalid logging");
-      }
-  %>
+%>
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Welcome to Axis2 web admin module !!</h1>
-<p>The Axis2 administration system can be used to check on the health of your Axis2 deployment. And you may use it to change any parameters at run time. Other than changing of parameters the web interface also has the ability to upload new services into Axis2[Service hot deployment.].</p>
+<p>The Axis2 administration system can be used to check on the health of your Axis2 deployment. And you may use it to change any parameters at run time. Other than changing of parameters the web interface also has the ability to upload new services into Axis2 [Service hot deployment.].</p>
 <jsp:include page="include/adminfooter.jsp"></jsp:include>



Mime
View raw message