axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r552178 - in /webservices/axis2/trunk/java/modules: kernel/src/org/apache/axis2/transport/http/ webapp/src/main/webapp/axis2-web/
Date Sat, 30 Jun 2007 17:20:20 GMT
Author: deepal
Date: Sat Jun 30 10:20:19 2007
New Revision: 552178

URL: http://svn.apache.org/viewvc?view=rev&rev=552178
Log:
fixing AXIS2-1910 and AXIS2-1950
 - AXIS2-1950 if the parameter is complex type then we do not display that

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
    webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp
    webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp
    webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
    webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java?view=diff&rev=552178&r1=552177&r2=552178
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AdminAgent.java
Sat Jun 30 10:20:19 2007
@@ -22,6 +22,8 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.description.AxisModule;
 import org.apache.axis2.description.AxisOperation;
@@ -43,11 +45,7 @@
 import javax.xml.namespace.QName;
 import java.io.File;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * Provides methods to process axis2 admin requests.
@@ -399,6 +397,35 @@
             throws IOException, ServletException {
         req.getSession().invalidate();
         renderView("index.jsp", req, res);
+    }
+
+    protected void processviewServiceGroupConetxt(HttpServletRequest req, HttpServletResponse
res)
+            throws IOException, ServletException {
+        String type = req.getParameter("TYPE");
+        String sgID = req.getParameter("ID");
+        ServiceGroupContext sgContext = configContext.getServiceGroupContext(sgID);
+        req.getSession().setAttribute("ServiceGroupContext",sgContext);
+        req.getSession().setAttribute("TYPE",type);
+        req.getSession().setAttribute("ConfigurationContext",configContext);
+        renderView("viewServiceGroupContext.jsp", req, res);
+    }
+
+    protected void processviewServiceContext(HttpServletRequest req, HttpServletResponse
res)
+            throws IOException, ServletException {
+        String type = req.getParameter("TYPE");
+        String sgID = req.getParameter("PID");
+        String ID = req.getParameter("ID");
+        ServiceGroupContext sgContext = configContext.getServiceGroupContext(sgID);
+        if (sgContext != null) {
+            AxisService service = sgContext.getDescription().getService(ID);
+            ServiceContext serviceContext = sgContext.getServiceContext(service);
+            req.setAttribute("ServiceContext",serviceContext);
+            req.setAttribute("TYPE",type);
+        } else {
+            req.setAttribute("ServiceContext",null);
+            req.setAttribute("TYPE",type);
+        }
+        renderView("viewServiceContext.jsp", req, res);
     }
 
     protected void processSelectServiceParaEdit(HttpServletRequest req, HttpServletResponse
res)

Modified: webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp?view=diff&rev=552178&r1=552177&r2=552178
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp
(original)
+++ webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ServiceParaEdit.jsp
Sat Jun 30 10:20:19 2007
@@ -46,6 +46,9 @@
                  ArrayList service_para = axisService.getParameters();
                  for (int i = 0; i < service_para.size(); i++) {
                      Parameter parameter = (Parameter) service_para.get(i);
+                     if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
+                         continue;
+                     }
                      %>
                      <tr>
                      <td><%=parameter.getName()%></td>
@@ -84,7 +87,10 @@
                     <%
                      op_paras = axisOperation.getParameters();
                      for (int i = 0; i < op_paras.size(); i++) {
-                     Parameter parameter = (Parameter) op_paras.get(i);
+                         Parameter parameter = (Parameter) op_paras.get(i);
+                         if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
+                             continue;
+                         }
                      %>
                      <tr>
                      <td><%=parameter.getName()%></td>

Modified: webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp?view=diff&rev=552178&r1=552177&r2=552178
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp
(original)
+++ webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/ViewContexts.jsp
Sat Jun 30 10:20:19 2007
@@ -26,21 +26,21 @@
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Running Context Hierarchy</h1>
 <%
-    ConfigurationContext configContext = (ConfigurationContext)request.getSession().getAttribute(
+    ConfigurationContext configContext = (ConfigurationContext) request.getSession().getAttribute(
             Constants.CONFIG_CONTEXT);
 
-    Hashtable serviceGroupContextsMap = configContext.getServiceGroupContexts();
-    Iterator serviceGroupContext = serviceGroupContextsMap.keySet().iterator();
-    if(serviceGroupContextsMap.size() >0){
-    %>
-     <ul>
+    String[] serviceGroupIds = configContext.getServiceGroupContextIDs();
+    if (serviceGroupIds.length > 0) {
+%>
+<ul>
     <%
-    while (serviceGroupContext.hasNext()) {
-        String groupContextID = (String)serviceGroupContext.next();
-        ServiceGroupContext groupContext = (ServiceGroupContext)serviceGroupContextsMap.get(groupContextID);
+
+   for (int i = 0; i < serviceGroupIds.length; i++) {
+        String groupContextID = serviceGroupIds[i];
+        ServiceGroupContext groupContext = configContext.getServiceGroupContext(groupContextID);
         %>
-           <li><%=groupContextID%><font color="blue"><a href="viewServiceGroupContext.jsp?TYPE=VIEW&ID=<%=groupContextID%>">
-                    View</a></font>  <font color="red"><a href="viewServiceGroupContext.jsp?TYPE=DELETE&ID=<%=groupContextID%>">
+           <li><%=groupContextID%><font color="blue"><a href="axis2-admin/viewServiceGroupConetxt?TYPE=VIEW&ID=<%=groupContextID%>">
+                    View</a></font>  <font color="red"><a href="axis2-admin/viewServiceGroupConetxt?TYPE=DELETE&ID=<%=groupContextID%>">
                     Remove</a> </font></li>
         <%
         Iterator serviceContextItr = groupContext.getServiceContexts();
@@ -49,7 +49,7 @@
             ServiceContext serviceContext = (ServiceContext)serviceContextItr.next();
              String serviceConID = serviceContext.getAxisService().getName();
         %>
-            <li><%=serviceConID%><font color="blue"><a href="viewServiceContext.jsp?TYPE=VIEW&ID=<%=serviceConID%>&PID=<%=groupContextID%>">
+            <li><%=serviceConID%><font color="blue"><a href="axis2-admin/viewServiceContext?TYPE=VIEW&ID=<%=serviceConID%>&PID=<%=groupContextID%>">
                     View</a></font></li>
         <%
         }

Modified: webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp?view=diff&rev=552178&r1=552177&r2=552178
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
(original)
+++ webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
Sat Jun 30 10:20:19 2007
@@ -28,37 +28,24 @@
 <jsp:include page="include/adminheader.jsp"/>
 <h1>Running Context Hierarchy</h1>
 <%
-    ConfigurationContext configContext = (ConfigurationContext) request.getSession().getAttribute(Constants.CONFIG_CONTEXT);
-    Hashtable serviceGroupContextsMap = configContext.getServiceGroupContexts();
-    String type = request.getParameter("TYPE");
-    String sgID = request.getParameter("PID");
-    String ID = request.getParameter("ID");
-    ServiceGroupContext sgContext = (ServiceGroupContext) serviceGroupContextsMap.get(sgID);
-    AxisService service = sgContext.getDescription().getService(ID);
-    ServiceContext serviceContext = sgContext.getServiceContext(service);
-    if (sgID != null && serviceContext != null) {
+    ServiceContext serviceContext = (ServiceContext) request.getSession().getAttribute("ServiceContext");
+    String type = (String) request.getSession().getAttribute("TYPE");
+    if (serviceContext != null) {
         if (type != null) {
             if ("VIEW".equals(type)) {
-                Map perMap = serviceContext.getProperties();
-                if (perMap.size() > 0) {
+                Iterator propertyNames = serviceContext.getPropertyNames();
 %>
 <h4>Persistance Properties</h4><ul>
     <%
-        Iterator itr = perMap.keySet().iterator();
-        while (itr.hasNext()) {
-            String key = (String) itr.next();
-            Object property = perMap.get(key);
+        while (propertyNames.hasNext()) {
+            String key = (String) propertyNames.next();
+            Object property = serviceContext.getProperty(key);
     %>
     <li><%=key%> : <%=property.toString()%></li>
     <%
         }
     %></ul>
 <%
-} else {
-%>
-<h4>No persistance properties found in the context</h4>
-<%
-        }
     }
 } else {
 %> <h4>No Service Context Found</h4><%

Modified: webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp?view=diff&rev=552178&r1=552177&r2=552178
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
(original)
+++ webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
Sat Jun 30 10:20:19 2007
@@ -26,41 +26,28 @@
 <jsp:include page="include/adminheader.jsp"></jsp:include>
 <h1>Runing Context hierachy</h1>
 <%
-    ConfigurationContext configContext = (ConfigurationContext)request.getSession().getAttribute(Constants.CONFIG_CONTEXT);
-    Hashtable serviceGroupContextsMap = configContext.getServiceGroupContexts();
-    String type = request.getParameter("TYPE");
-    String sgID = request.getParameter("ID");
-    ServiceGroupContext sgContext = (ServiceGroupContext)serviceGroupContextsMap.get(sgID);
-    if(sgID !=null && sgContext !=null){
-        if(type != null){
-            if("VIEW".equals(type)){
-             Map perMap = sgContext.getProperties();
-             if(perMap.size()>0){
-             %>
+    String type = (String) request.getSession().getAttribute("TYPE");
+    ConfigurationContext configCtx = (ConfigurationContext) request.getSession().getAttribute("ConfigurationContext");
+    ServiceGroupContext sgContext = (ServiceGroupContext) request.getSession().getAttribute("ServiceGroupContext");
+    if (sgContext != null) {
+        if (type != null) {
+            if ("VIEW".equals(type)) {
+              Iterator propertyNames = sgContext.getPropertyNames();
+%>
              <h4>Persistance properties</h4><ul>
              <%
-                 Iterator itr = perMap.keySet().iterator();
-                 while (itr.hasNext()) {
-                     String key = (String) itr.next();
-                     Object property =  perMap.get(key);
+                 while (propertyNames.hasNext()) {
+                     String key = (String) propertyNames.next();
+                     Object property =  sgContext.getProperty(key);
               %>
                    <li><%=key%> : <%=property.toString()%></li>
               <%
                  }
                  %></ul>
                  <%
-             } else {
-            %>
-             <h4>No persistance properties found in the context</h4>
-            <%
-             }
             }   else if("DELETE".equals(type)){
-                Object obj = serviceGroupContextsMap.remove(sgID);
-                if(obj != null){
+                 configCtx.removeServiceGroupContext(sgContext.getId());
                  %>Removed the context<%
-            }else {
-                %>Unable to remove the context <%
-            }
             }
         }
     } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message