2 ~ Licensed to the Apache Software Foundation (ASF) under one
3 ~ or more contributor license agreements. See the NOTICE file
4 ~ distributed with this work for additional information
5 ~ regarding copyright ownership. The ASF licenses this file
6 ~ to you under the Apache License, Version 2.0 (the
7 ~ "License"); you may not use this file except in compliance
8 ~ with the License. You may obtain a copy of the License at
10 ~ http://www.apache.org/licenses/LICENSE-2.0
12 ~ Unless required by applicable law or agreed to in writing,
13 ~ software distributed under the License is distributed on an
14 ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 ~ KIND, either express or implied. See the License for the
16 ~ specific language governing permissions and limitations
20 <%@ page import="org.apache.axis2.Constants,
21 org.apache.axis2.description.AxisModule" %>
22 <%@ page import="org.apache.axis2.description.AxisOperation" %>
23 <%@ page import="org.apache.axis2.description.AxisService" %>
24 <%@ page import="org.apache.axis2.description.Parameter" %>
25 <%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
26 <%@ page import="org.apache.axis2.util.JavaUtils" %>
27 <%@ page import="java.util.Collection" %>
28 <%@ page import="java.util.Enumeration" %>
29 <%@ page import="java.util.HashMap" %>
30 <%@ page import="java.util.Hashtable" %>
31 <%@ page import="java.util.Iterator" %>
32 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
33 <jsp:include page="include/adminheader.jsp"/>
35 <h1>Available Services</h1>
36 <% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
39 HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP);
40 request.getSession().setAttribute(Constants.SERVICE_MAP, null);
41 Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
42 boolean status = false;
43 if (serviceMap != null && !serviceMap.isEmpty()) {
46 Collection servicecol = serviceMap.values();
47 for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
48 AxisService axisService = (AxisService) iterator.next();
49 operations = axisService.getOperations();
50 serviceName = axisService.getName();
51 %><h2><font color="blue"><a href="<%=prefix + axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
53 // do we need to enable REST in the main servlet so that it handles both REST and SOAP messages
54 boolean disableREST = false;
55 AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
59 // do we need to completely disable REST support
60 parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
61 if (parameter != null) {
62 disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
73 String serviceDescription = axisService.getServiceDescription();
74 if (serviceDescription == null || "".equals(serviceDescription)) {
75 serviceDescription = "No description available for this service";
78 <p>Service Description : <%=serviceDescription%><br/>
79 Service EPR : <%=prefix + axisService.getName()%><br/>
80 Service Status : <%=axisService.isActive() ? "Active" : "InActive"%>
81 Actions : <a href="axis2-admin/deleteService?serviceName=<%=serviceName%>">Remove Service</a></p><br>
83 Collection engagedModules = axisService.getEngagedModules();
85 boolean modules_present = false;
86 if (engagedModules.size() > 0) {
88 <i>Engaged modules for the service</i>
90 for (Iterator iteratorm = engagedModules.iterator(); iteratorm.hasNext();) {
91 AxisModule axisOperation = (AxisModule) iteratorm.next();
92 moduleName = axisOperation.getName();
93 if (!modules_present) {
94 modules_present = true;
98 %><li><%=moduleName%> :: <a href="axis2-admin/disengageModule?type=service&serviceName=<%=serviceName%>&module=<%=moduleName%>">Disengage</a></li>
102 if (modules_present) {%>
107 if (operations.hasNext()) {
108 %><br><i>Available operations</i><%
110 %><i> There are no Operations specified</i><%
113 operations = axisService.getOperations();
114 while (operations.hasNext()) {
115 AxisOperation axisOperation = (AxisOperation) operations.next();
116 %><li><%=axisOperation.getName().getLocalPart()%></li>
117 <%-- <br>Operation EPR : <%=prifix + axisService.getName().getLocalPart() + "/"+ axisOperation.getName().getLocalPart()%>--%>
119 engagedModules = axisOperation.getEngagedModules();
120 if (engagedModules.size() > 0) {
122 <br><i>Engaged Modules for the Operation</i><ul>
124 for (Iterator iterator2 = engagedModules.iterator(); iterator2.hasNext();) {
125 AxisModule moduleDecription = (AxisModule) iterator2.next();
126 moduleName = moduleDecription.getName();
127 %><li><%=moduleName%> :: <a href="axis2-admin/disengageModule?type=operation&serviceName=<%=serviceName%>&operation=<%=axisOperation.getName().getLocalPart()%>&module=<%=moduleName%>">Disengage</a></li><br><%
138 if (errornessservice != null) {
139 if (errornessservice.size() > 0) {
140 request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
142 <h3><font color="red">Faulty Services</font></h3>
144 Enumeration faultyservices = errornessservice.keys();
145 while (faultyservices.hasMoreElements()) {
146 String faultyserviceName = (String) faultyservices.nextElement();
147 %><h3><font color="blue"><a href="services/ListFaultyServices?serviceName=<%=faultyserviceName%>">
148 <%=faultyserviceName%></a></font></h3>
155 %> No services listed! Try hitting refresh. <%
158 <jsp:include page="include/adminfooter.inc" />