Author: ruwan
Date: Wed Jan 26 11:17:22 2011
New Revision: 1063678
URL: http://svn.apache.org/viewvc?rev=1063678&view=rev
Log:
Fixing the issue AXIS2-1755, added a remove service link to remove the serivce
from the admin page of services. Though this has been done in the same manner
the rest of the admin console stuff were. I think there need to be a whole
re-write of the admin console of axis2, including the style of writing the
webapp as well as the UI, but that is out of the scope of the 1.6 release.
Added:
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp
Modified:
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listService.jsp
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listServices.jsp
Modified:
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java?rev=1063678&r1=1063677&r2=1063678&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
(original)
+++
axis/axis2/java/core/trunk/modules/webapp/src/main/java/org/apache/axis2/webapp/AdminAgent.java
Wed Jan 26 11:17:22 2011
@@ -599,6 +599,20 @@ public class AdminAgent extends Abstract
renderView("disengage.jsp", req, res);
}
+ public void processdeleteService(HttpServletRequest req,
HttpServletResponse res)
+ throws IOException, ServletException {
+ String serviceName = req.getParameter("serviceName");
+ AxisConfiguration axisConfiguration =
configContext.getAxisConfiguration();
+ if (axisConfiguration.getService(serviceName) != null) {
+ axisConfiguration.removeService(serviceName);
+ req.getSession().setAttribute("status", "Service '" + serviceName
+ "' has been successfully removed.");
+ } else {
+ req.getSession().setAttribute("status", "Failed to delete service
'" + serviceName + "'. Service doesn't exist.");
+ }
+
+ renderView("deleteService.jsp", req, res);
+ }
+
public void processSelectService(HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException {
populateSessionInformation(req);
Added:
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp?rev=1063678&view=auto
==============================================================================
---
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp
(added)
+++
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/deleteService.jsp
Wed Jan 26 11:17:22 2011
@@ -0,0 +1,23 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<jsp:include page="include/adminheader.jsp"/>
+<p><%=request.getSession().getAttribute("status")%></p>
+<p>Click <a href="services/listServices">here</a> to go to the service list
page</p>
+<jsp:include page="include/adminfooter.inc" />
\ No newline at end of file
Modified:
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listService.jsp
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listService.jsp?rev=1063678&r1=1063677&r2=1063678&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listService.jsp
(original)
+++
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listService.jsp
Wed Jan 26 11:17:22 2011
@@ -49,7 +49,6 @@
operations = axisService.getOperations();
serviceName = axisService.getName();
%><h2><font color="blue"><a href="<%=prefix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
-<font color="blue">Service EPR : </font><font color="black"><%=prefix +
axisService.getName()%></font><br>
<%
// do we need to enable REST in the main servlet so that it handles both
REST and SOAP messages
boolean disableREST = false;
@@ -76,8 +75,10 @@
serviceDescription = "No description available for this service";
}
%>
- <h4>Service Description : <font
color="black"><%=serviceDescription%></font></h4>
-<i><font color="blue">Service Status : <%=axisService.isActive() ? "Active" :
"InActive"%></font></i><br>
+<p>Service Description : <%=serviceDescription%><br/>
+Service EPR : <%=prefix + axisService.getName()%><br/>
+Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
+Actions : <a
href="axis2-admin/deleteService?serviceName=<%=serviceName%>">Remove
Service</a></p><br>
<%
Collection engagedModules = axisService.getEngagedModules();
String moduleName;
Modified:
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listServices.jsp
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listServices.jsp?rev=1063678&r1=1063677&r2=1063678&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listServices.jsp
(original)
+++
axis/axis2/java/core/trunk/modules/webapp/src/main/webapp/axis2-web/listServices.jsp
Wed Jan 26 11:17:22 2011
@@ -58,7 +58,6 @@
//operationsList = operations.values();
serviceName = axisService.getName();
%><h2><font color="blue"><a href="<%=prefix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
-<font color="blue">Service EPR : </font><font color="black"><%=prefix +
axisService.getName()%></font><br>
<%
boolean disableREST = false;
AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
@@ -83,8 +82,9 @@
serviceDescription = "No description available for this service";
}
%>
-<h4>Service Description : <font
color="black"><%=serviceDescription%></font></h4>
-<i><font color="blue">Service Status : <%=axisService.isActive() ? "Active" :
"InActive"%></font></i><br>
+<h5>Service Description : <font
color="black"><%=serviceDescription%></font></h5>
+<h5>Service EPR : <%=prefix + axisService.getName()%></h5>
+<h5>Service Status : <%=axisService.isActive() ? "Active" :
"InActive"%></h5><br>
<%
if (opItr.hasNext()) {
%><i>Available Operations</i><%