]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/.metadata/.plugins/org.apache.axis2.facet/exploadedwar/axis2-web/listService.jsp
Salome HOME
SIMAN Eclipse workspace first version
[tools/siman.git] / Workspace / .metadata / .plugins / org.apache.axis2.facet / exploadedwar / axis2-web / listService.jsp
1 <%--
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
9   ~
10   ~ http://www.apache.org/licenses/LICENSE-2.0
11   ~
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
17   ~ under the License.
18   --%>
19
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"/>
34
35 <h1>Available Services</h1>
36 <% String prefix = request.getAttribute("frontendHostUrl") + (String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
37 %>
38 <%
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()) {
44         Iterator operations;
45         String serviceName;
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>
52 <%
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();
56
57     Parameter parameter ;
58
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());
63     }
64     if (!disableREST) {
65 %>
66
67 <%
68 %>
69 <%
70     }
71
72
73     String serviceDescription = axisService.getServiceDescription();
74     if (serviceDescription == null || "".equals(serviceDescription)) {
75         serviceDescription = "No description available for this service";
76     }
77 %>
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>
82 <%
83     Collection engagedModules = axisService.getEngagedModules();
84     String moduleName;
85     boolean modules_present = false;
86     if (engagedModules.size() > 0) {
87 %>
88 <i>Engaged modules for the service</i>
89 <%
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;
95 %>
96 <ul>
97     <% }
98     %><li><%=moduleName%> :: <a href="axis2-admin/disengageModule?type=service&serviceName=<%=serviceName%>&module=<%=moduleName%>">Disengage</a></li>
99     <br>
100     <%
101         }
102         if (modules_present) {%>
103 </ul>
104 <%
105         }
106     }
107     if (operations.hasNext()) {
108 %><br><i>Available operations</i><%
109 } else {
110 %><i> There are no Operations specified</i><%
111     }
112 %><ul><%
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()%>--%>
118     <%
119         engagedModules = axisOperation.getEngagedModules();
120         if (engagedModules.size() > 0) {
121     %>
122     <br><i>Engaged Modules for the Operation</i><ul>
123     <%
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><%
128     }
129 %></ul><%
130         }
131
132     }
133 %></ul>
134 <%
135             status = true;
136         }
137     }
138     if (errornessservice != null) {
139         if (errornessservice.size() > 0) {
140             request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
141 %>
142 <h3><font color="red">Faulty Services</font></h3>
143 <%
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>
149 <%
150             }
151         }
152         status = true;
153     }
154     if (!status) {
155 %> No services listed! Try hitting refresh. <%
156     }
157 %>
158 <jsp:include page="include/adminfooter.inc" />