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.AxisOperation" %>
22 <%@ page import="org.apache.axis2.description.AxisService" %>
23 <%@ page import="org.apache.axis2.description.Parameter" %>
24 <%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
25 <%@ page import="org.apache.axis2.util.JavaUtils" %>
26 <%@ page import="java.util.Collection" %>
27 <%@ page import="java.util.Enumeration" %>
28 <%@ page import="java.util.HashMap" %>
29 <%@ page import="java.util.Hashtable" %>
30 <%@ page import="java.util.Iterator" %>
31 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
33 <jsp:include page="include/httpbase.jsp"/>
34 <head><title>List Services</title>
35 <link href="axis2-web/css/axis-style.css" rel="stylesheet" type="text/css"/>
39 <jsp:include page="include/header.inc" />
40 <jsp:include page="include/link-footer.jsp" />
41 <h1>Available services</h1>
42 <% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
45 HashMap serviceMap = (HashMap) request.getSession().getAttribute(Constants.SERVICE_MAP);
46 request.getSession().setAttribute(Constants.SERVICE_MAP, null);
47 Hashtable errornessservice = (Hashtable) request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
48 boolean status = false;
49 if (serviceMap != null && !serviceMap.isEmpty()) {
53 Collection servicecol = serviceMap.values();
54 // Collection operationsList;
55 for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
56 AxisService axisService = (AxisService) iterator.next();
57 opItr = axisService.getOperations();
58 //operationsList = operations.values();
59 serviceName = axisService.getName();
60 %><h2><font color="blue"><a href="<%=prefix + axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
62 boolean disableREST = false;
63 AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
67 // do we need to completely disable REST support
68 parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
69 if (parameter != null) {
70 disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
80 String serviceDescription = axisService.getServiceDescription();
81 if (serviceDescription == null || "".equals(serviceDescription)) {
82 serviceDescription = "No description available for this service";
85 <h5>Service Description : <font color="black"><%=serviceDescription%></font></h5>
86 <h5>Service EPR : <%=prefix + axisService.getName()%></h5>
87 <h5>Service Status : <%=axisService.isActive() ? "Active" : "InActive"%></h5><br>
89 if (opItr.hasNext()) {
90 %><i>Available Operations</i><%
92 %><i> There are no Operations specified</i><%
94 opItr = axisService.getOperations();
96 while (opItr.hasNext()) {
97 AxisOperation axisOperation = (AxisOperation) opItr.next();
98 %><li><%=axisOperation.getName().getLocalPart()%></li>
99 <%-- <br>Operation EPR : <%=prifix + axisService.getName().getLocalPart() + "/"+ axisOperation.getName().getLocalPart()%>--%>
107 if (errornessservice != null) {
108 if (errornessservice.size() > 0) {
109 request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
113 <h3><font color="blue">Faulty Services</font></h3>
115 Enumeration faultyservices = errornessservice.keys();
116 while (faultyservices.hasMoreElements()) {
117 String faultyserviceName = (String) faultyservices.nextElement();
118 %><h3><font color="blue"><a href="services/ListFaultyServices?serviceName=<%=faultyserviceName%>">
119 <%=faultyserviceName%></a></font></h3>
126 %> No services listed! Try hitting refresh. <%
129 <jsp:include page="include/footer.inc" />