You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2005/05/20 12:55:35 UTC

svn commit: r171095 - in /webservices/axis/trunk/java/modules/core: html/ samples/deployment/OutService/META-INF/ samples/deployment/service1/META-INF/ samples/deployment/service2/META-INF/ src/org/apache/axis/deployment/ src/org/apache/axis/description/

Author: deepal
Date: Fri May 20 03:55:34 2005
New Revision: 171095

URL: http://svn.apache.org/viewcvs?rev=171095&view=rev
Log:
modified jsps and added service description filed into service.xml , now service author can  describe nature of his service there

Modified:
    webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp
    webservices/axis/trunk/java/modules/core/html/listServices.jsp
    webservices/axis/trunk/java/modules/core/html/listSingleService.jsp
    webservices/axis/trunk/java/modules/core/samples/deployment/OutService/META-INF/service.xml
    webservices/axis/trunk/java/modules/core/samples/deployment/service1/META-INF/service.xml
    webservices/axis/trunk/java/modules/core/samples/deployment/service2/META-INF/service.xml
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentConstants.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java

Modified: webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp Fri May 20 03:55:34 2005
@@ -9,10 +9,7 @@
                  org.apache.axis.addressing.AddressingConstants,
                  org.apache.axis.addressing.EndpointReference,
                  org.apache.axis.clientapi.Call,
-                 org.apache.axis.testUtils.ObjectToOMBuilder,
-                 org.apache.axis.testUtils.SimpleTypeEncoder,
                  org.apache.axis.om.*,
-                 org.apache.axis.testUtils.SimpleTypeEncodingUtils,
                  org.apache.axis.soap.SOAPBody,
                  org.apache.axis.soap.SOAPEnvelope,
                  org.apache.axis.soap.SOAPFactory"

Modified: webservices/axis/trunk/java/modules/core/html/listServices.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/listServices.jsp?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/listServices.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/listServices.jsp Fri May 20 03:55:34 2005
@@ -1,7 +1,7 @@
-<%@ page import="org.apache.axis.description.AxisService,
-                 org.apache.axis.Constants,
-                 org.apache.axis.description.AxisOperation,
-                 java.util.*"%>
+<%@ page import="org.apache.axis.Constants,
+                 java.util.*,
+                 org.apache.axis.description.ServiceDescription,
+                 org.apache.axis.description.OperationDescription"%>
  <%--
     /*
  * Copyright 2002,2004 The Apache Software Foundation.
@@ -38,11 +38,12 @@
         Collection servicecol = serviceMap.values();
         Collection operationsList;
        for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
-            AxisService axisService = (AxisService) iterator.next();
+            ServiceDescription axisService = (ServiceDescription) iterator.next();
             operations = axisService.getOperations();
             operationsList = operations.values();
             serviceName = axisService.getName().getLocalPart();
-            %><hr><h3><font color="blue"><%=serviceName%></font></h3>
+            %><hr><h2><font color="blue"><%=serviceName%></font></h2>
+            <h4><font color="black"><%=axisService.getServiceDescription()%></h4>
            <%
             if (operationsList.size() > 0) {
                 %><i>Available operations</i><%
@@ -51,7 +52,7 @@
             }
            %><ul><%
             for (Iterator iterator1 = operationsList.iterator(); iterator1.hasNext();) {
-                AxisOperation axisOperation = (AxisOperation) iterator1.next();
+                OperationDescription axisOperation = (OperationDescription) iterator1.next();
                 %><li><%=axisOperation.getName().getLocalPart()%></li><%
             }
            %></ul>

Modified: webservices/axis/trunk/java/modules/core/html/listSingleService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/listSingleService.jsp?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/listSingleService.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/listSingleService.jsp Fri May 20 03:55:34 2005
@@ -1,10 +1,10 @@
 <%@ page import="java.util.Iterator,
-                 org.apache.axis.description.AxisOperation,
                  java.util.HashMap,
                  java.util.Collection,
-                 org.apache.axis.description.AxisService,
                  org.apache.axis.Constants,
-                 java.util.Hashtable"%>
+                 java.util.Hashtable,
+                 org.apache.axis.description.ServiceDescription,
+                 org.apache.axis.description.OperationDescription"%>
  <%--
   Created by IntelliJ IDEA.
   User: Ajith
@@ -22,7 +22,7 @@
         <jsp:include page="include/header.inc"></jsp:include>
 
         <%
-            AxisService service = (AxisService)request.getSession().getAttribute(Constants.SINGLE_SERVICE);
+            ServiceDescription service = (ServiceDescription)request.getSession().getAttribute(Constants.SINGLE_SERVICE);
             //System.out.println("service = " + service);
             String isFault = (String)request.getSession().getAttribute(Constants.IS_FAULTY);
             System.out.println("isFault = " + isFault);
@@ -57,7 +57,7 @@
                 }
         %><ul><%
                 for (Iterator iterator1 = operationsList.iterator(); iterator1.hasNext();) {
-                    AxisOperation axisOperation = (AxisOperation) iterator1.next();
+                    OperationDescription axisOperation = (OperationDescription) iterator1.next();
         %><li>
 <%=axisOperation.getName().getLocalPart()%></li>
 <%

Modified: webservices/axis/trunk/java/modules/core/samples/deployment/OutService/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/samples/deployment/OutService/META-INF/service.xml?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/samples/deployment/OutService/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/modules/core/samples/deployment/OutService/META-INF/service.xml Fri May 20 03:55:34 2005
@@ -1,4 +1,7 @@
 <service name="">
+    <description>
+        This is a testing service , to test the system is working or not
+    </description>
     <parameter name="ServiceClass" locked="xsd:false">org.apache.axis.services.OutService</parameter>
     <parameter name="OUTSERVICE" locked="xsd:true">true</parameter>
     <operation name="outService"/>

Modified: webservices/axis/trunk/java/modules/core/samples/deployment/service1/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/samples/deployment/service1/META-INF/service.xml?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/samples/deployment/service1/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/modules/core/samples/deployment/service1/META-INF/service.xml Fri May 20 03:55:34 2005
@@ -1,4 +1,8 @@
 <service name="">
+
+    <description>
+        This is a testing service , to test the system is working or not
+    </description>
     <parameter name="ServiceClass" locked="xsd:false">org.apache.axis.sample.echo.EchoImpl</parameter>
     <inflow>
         <handler name="logging" class="org.apache.axis.sample.handlers.LoggingHandler">

Modified: webservices/axis/trunk/java/modules/core/samples/deployment/service2/META-INF/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/samples/deployment/service2/META-INF/service.xml?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/samples/deployment/service2/META-INF/service.xml (original)
+++ webservices/axis/trunk/java/modules/core/samples/deployment/service2/META-INF/service.xml Fri May 20 03:55:34 2005
@@ -2,8 +2,10 @@
     <!-- these are Service Parameters -->
     <parameter name="para1" locked="xsd:true">10</parameter>
     <parameter name="para2" locked="xsd:false">Colombo</parameter>
-
-    <module ref="module1"></module>
+   <description>
+        This is a testing service , to test the system is working or not
+    </description>
+   
        <!--  Service TypeMapping -->
 
     <!--
@@ -45,5 +47,7 @@
             <order phase="userphase1" phaseLast="false"/>
         </handler>
     </Outfaultflow>
-    <operation name="opname"/>
+    <operation name="opname">
+      <module ref="module1"></module>
+    </operation>
 </service>

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentConstants.java?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentConstants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentConstants.java Fri May 20 03:55:34 2005
@@ -74,9 +74,7 @@
     String PHASEFIRST = "phaseFirst";
     String PHASELAST = "phaseLast";
     String ORDER = "order";  // to resolve the order tag
-
-    String JAVAST = "http://ws.apache.org/axis2/deployment/java";
-    String JAVAIMPL = "implementation";
+    String DESCRIPTION = "description";
 
     String TRANSPORTSTAG = "transports";
     String TRANSPORTTAG = "transport";
@@ -88,5 +86,6 @@
 
     String HOTDEPLOYMENT = "hotdeployment";
     String HOTUPDATE = "hotupdate";
+
 
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Fri May 20 03:55:34 2005
@@ -387,6 +387,7 @@
 
         }
             ///factory.createChains(serviceMetaData, axisConfig, );
+            System.out.println("service Description : " + serviceMetaData.getServiceDescription());
             System.out.println("adding new service : " + serviceMetaData.getName().getLocalPart());
         } catch (PhaseException e) {
             throw new AxisFault(e);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentParser.java Fri May 20 03:55:34 2005
@@ -18,9 +18,9 @@
 
 import org.apache.axis.deployment.util.DeploymentData;
 import org.apache.axis.description.*;
+import org.apache.axis.engine.AxisConfigurationImpl;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.MessageReceiver;
-import org.apache.axis.engine.AxisConfigurationImpl;
 import org.apache.axis.transport.TransportListener;
 import org.apache.axis.transport.TransportSender;
 
@@ -91,7 +91,7 @@
     /**
      * To process server.xml
      */
-    public void processGlobalConfig(AxisConfigurationImpl axisGlobal , String starttag) throws DeploymentException {
+    public void processGlobalConfig(AxisConfigurationImpl axisGlobal, String starttag) throws DeploymentException {
         String START_TAG = starttag;
         try {
             boolean END_DOCUMENT = false;
@@ -364,6 +364,9 @@
                         Parameter parameter = processParameter();
                         axisService.addParameter(parameter);
                         //axisService. .appParameter(parameter);
+                    } else if (DESCRIPTION.equals(ST)) {
+                        String desc = processDescription();
+                        axisService.setServiceDescription(desc);
                     } else if (TYPEMAPPINGST.equals(ST)) {
                         throw new UnsupportedOperationException("Type mapping dose not implemented yet ");
                         //  processTypeMapping();
@@ -373,13 +376,13 @@
                     } else if (OPRATIONST.equals(ST)) {
                         OperationDescription operation = processOperation();
                         DeploymentData.getInstance().setOperationPhases(operation);
-                        if(operation.getMessageReciever() == null ) {
+                        if (operation.getMessageReciever() == null) {
                             try {
                                 /**
                                  * Setting default Message Recive as Message Reciever
                                  */
                                 ClassLoader loader1 = Thread.currentThread().getContextClassLoader();
-                                Class    messageReceiver = Class.forName("org.apache.axis.receivers.RawXMLINOutMessageRecevier", true, loader1);
+                                Class messageReceiver = Class.forName("org.apache.axis.receivers.RawXMLINOutMessageRecevier", true, loader1);
                                 operation.setMessageReciever((MessageReceiver) messageReceiver.newInstance());
                             } catch (ClassNotFoundException e) {
                                 throw new DeploymentException("Error in loading messageRecivers " + e.getMessage());
@@ -430,6 +433,32 @@
         }
     }
 
+    private String processDescription() throws DeploymentException {
+        String desc = "";
+        boolean END_DESC = false;
+        try {
+            while (!END_DESC) {
+                int eventType = pullparser.next();
+                if (eventType == XMLStreamConstants.END_DOCUMENT) {
+                    END_DESC = true;
+                } else if (eventType == XMLStreamConstants.END_ELEMENT) {
+                    String endtagname = pullparser.getLocalName();
+                    if (DESCRIPTION.equals(endtagname)) {
+                        END_DESC = true;
+                        break;
+                    }
+
+                } else if (eventType == XMLStreamConstants.CHARACTERS) {
+                    desc += pullparser.getText();
+                }
+            }
+        } catch (XMLStreamException e) {
+            throw new DeploymentException("parser Exception", e);
+        } catch (Exception e) {
+            throw new DeploymentException(e.getMessage());
+        }
+        return desc;
+    }
 
     private Parameter processParameter() throws DeploymentException {
         Parameter parameter = new ParameterImpl();
@@ -759,7 +788,8 @@
                     }
                 }
             }
-        } if(!foundClass) {
+        }
+        if (!foundClass) {
             throw new DeploymentException("Module Implemantation class dose not found");
         }
         boolean END_MODULE = false;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java?rev=171095&r1=171094&r2=171095&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java Fri May 20 03:55:34 2005
@@ -40,6 +40,8 @@
      */
     protected final HashMap operationsMap = new HashMap();
 
+    private String serviceDescription = "Not Specified";
+
     /**
      * Constructor ServiceDescription
      */
@@ -407,6 +409,22 @@
 
         return serviceContext;
 
+    }
+
+    /**
+     * To get the description about the service
+     * @return
+     */
+    public String getServiceDescription() {
+        return serviceDescription;
+    }
+
+    /**
+     * Set the description about the service
+     * @param serviceDescription
+     */
+    public void setServiceDescription(String serviceDescription) {
+        this.serviceDescription = serviceDescription;
     }
 
 }