axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r179193 - in /webservices/axis/trunk/java/modules/core: html/HappyAxis.jsp src/org/apache/axis/description/OperationDescription.java src/org/apache/axis/description/ServiceDescription.java src/org/apache/axis/engine/AxisConfigurationImpl.java src/org/apache/axis/phaseresolver/PhaseResolver.java
Date Tue, 31 May 2005 06:31:37 GMT
Author: deepal
Date: Mon May 30 23:31:35 2005
New Revision: 179193

URL: http://svn.apache.org/viewcvs?rev=179193&view=rev
Log:
module engage through jsp pages

Modified:
    webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.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=179193&r1=179192&r2=179193&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/HappyAxis.jsp Mon May 30 23:31:35 2005
@@ -17,8 +17,6 @@
                  javax.xml.stream.XMLOutputFactory,
                  org.apache.axis.engine.AxisFault,
                  javax.xml.stream.XMLStreamException,
-                 org.apache.commons.logging.Log,
-                 org.apache.commons.logging.LogFactory,
                  javax.xml.namespace.QName,
                  java.io.StringWriter"
    session="false" %>
@@ -46,6 +44,12 @@
 <body>
    <jsp:include page="include/header.inc"></jsp:include>
 <%port =request.getServerPort();%>
+<%IP=request.getRequestURL().toString();
+    int lastindex = IP.lastIndexOf('/');
+    IP = IP.substring(0,lastindex);
+    targetEPR = new EndpointReference(AddressingConstants.WSA_TO,
+                    IP + "/axis2/services/echo/echoOMElement");
+%>
 <%!
     /*
     * Happiness tests for axis. These look at the classpath and warn if things
@@ -54,6 +58,8 @@
     * page for easy re-use
     */
     int port = 0;
+    String IP;
+    EndpointReference targetEPR ;
     /**
      * Get a string providing install information.
      * TODO: make this platform aware and give specific hints
@@ -319,11 +325,6 @@
     }
 
     private String value;
-     private EndpointReference targetEPR =
-            new EndpointReference(AddressingConstants.WSA_TO,
-                    "http://127.0.0.1:"
-            + (port)
-            + "/axis2/services/echo/echoOMElement");
     private QName operationName = new QName("echoOMElement");
     private OMElement createEnvelope() {
         OMFactory fac = OMAbstractFactory.getOMFactory();

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java?rev=179193&r1=179192&r2=179193&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/OperationDescription.java
Mon May 30 23:31:35 2005
@@ -14,6 +14,7 @@
 import javax.xml.namespace.QName;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * @author chathura@opensource.lk
@@ -65,19 +66,35 @@
         if (moduleref == null) {
             return;
         }
+        if (moduleref != null) {
+            Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
+            for (Iterator iterator = collectionModule.iterator(); iterator.hasNext();) {
+                ModuleDescription   modu = (ModuleDescription) iterator.next();
+                if(modu.getName().equals(moduleref.getName())){
+                    throw new AxisFault(moduleref.getName().getLocalPart()+ " module has
alredy engaged to the operation" +
+                            "  operation terminated !!!");
+                }
+
+            }
+        }
+        new PhaseResolver().engageModuleToOperation(this, moduleref);
         Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
         collectionModule.add(moduleref);
-        new PhaseResolver().engageModuleToOperation(this, moduleref);
+    }
+
+    public void addToEngageModuleList(QName moduleName){
+        Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
+        collectionModule.add(moduleName);
     }
 
 
 
 
     /*
-     * (non-Javadoc)
-     *
-     * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
+    */
 
     /**
      * Method getEngadgedModules

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=179193&r1=179192&r2=179193&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
Mon May 30 23:31:35 2005
@@ -1,18 +1,18 @@
 /*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 package org.apache.axis.description;
 
 import org.apache.axis.context.MessageContext;
@@ -26,13 +26,14 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.Iterator;
 
 /**
  * Class ServiceDescription
  */
 public class ServiceDescription
-    extends WSDLServiceImpl
-    implements WSDLService, ParameterInclude, FlowInclude, DescriptionConstants {
+        extends WSDLServiceImpl
+        implements WSDLService, ParameterInclude, FlowInclude, DescriptionConstants {
     /**
      * TODO this should be in the WSDLInterface, yet we want it to have in the
      * the Services, so we put this here for M1 until we foud better way to do
@@ -61,30 +62,46 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#addModule(javax.xml.namespace.QName)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#addModule(javax.xml.namespace.QName)
+    */
 
     /**
      * To ebgage a module it is reuired to use this method
      * @param moduleref
      * @throws AxisFault
      */
-     public void engageModule(ModuleDescription moduleref) throws AxisFault {
+    public void engageModule(ModuleDescription moduleref) throws AxisFault {
         if (moduleref == null) {
             return;
         }
+        if (moduleref != null) {
+            Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
+            for (Iterator iterator = collectionModule.iterator(); iterator.hasNext();) {
+                ModuleDescription   modu = (ModuleDescription) iterator.next();
+                if(modu.getName().equals(moduleref.getName())){
+                    throw new AxisFault(moduleref.getName().getLocalPart()+ " module has
alredy engaged to the seevice" +
+                            "  operation terminated !!!");
+                }
+
+            }
+        }
         new PhaseResolver().engageModuleToService(this,moduleref);
         Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
         collectionModule.add(moduleref);
     }
 
+    public void addToEngagModuleList(QName moduleName){
+        Collection collectionModule = (Collection) this.getComponentProperty(MODULEREF_KEY);
+        collectionModule.add(moduleName);
+    }
+
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#getEngadgedModules()
+    */
 
     /**
      * Method getEngadgedModules
@@ -110,10 +127,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#addOperation(org.apache.axis.description.OperationDescription)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#addOperation(org.apache.axis.description.OperationDescription)
+    */
 
     /**
      * Method addOperation
@@ -131,10 +148,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#setClassLoader(java.lang.ClassLoader)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#setClassLoader(java.lang.ClassLoader)
+    */
 
     /**
      * Method setClassLoader
@@ -148,10 +165,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#getClassLoader()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#getClassLoader()
+    */
 
     /**
      * Method getClassLoader
@@ -163,10 +180,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#setContextPath(java.lang.String)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#setContextPath(java.lang.String)
+    */
 
     /**
      * Method setContextPath
@@ -180,10 +197,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#getContextPath()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#getContextPath()
+    */
 
     /**
      * Method getContextPath
@@ -195,10 +212,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#setStyle(javax.swing.text.Style)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#setStyle(javax.swing.text.Style)
+    */
 
     /**
      * Method setStyle
@@ -212,10 +229,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ServiceDescription#getStyle()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ServiceDescription#getStyle()
+    */
 
     /**
      * Method getStyle
@@ -227,17 +244,17 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.PhasesInclude#getPhases(java.util.ArrayList,
-     *      int)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.PhasesInclude#getPhases(java.util.ArrayList,
+    *      int)
+    */
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ParameterInclude#addParameter(org.apache.axis.description.Parameter)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ParameterInclude#addParameter(org.apache.axis.description.Parameter)
+    */
 
     /**
      * Method addParameter
@@ -249,15 +266,15 @@
             return;
         }
         ParameterIncludeImpl paramInclude =
-            (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
+                (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
         paramInclude.addParameter(param);
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.ParameterInclude#getParameter(java.lang.String)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.ParameterInclude#getParameter(java.lang.String)
+    */
 
     /**
      * Method getParameter
@@ -267,15 +284,15 @@
      */
     public Parameter getParameter(String name) {
         ParameterIncludeImpl paramInclude =
-            (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
+                (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
         return (Parameter) paramInclude.getParameter(name);
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#getInFlow()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#getInFlow()
+    */
 
     /**
      * Method getInFlow
@@ -287,10 +304,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#setInFlow(org.apache.axis.description.Flow)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#setInFlow(org.apache.axis.description.Flow)
+    */
 
     /**
      * Method setInFlow
@@ -304,10 +321,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#getOutFlow()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#getOutFlow()
+    */
 
     /**
      * Method getOutFlow
@@ -319,10 +336,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#setOutFlow(org.apache.axis.description.Flow)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#setOutFlow(org.apache.axis.description.Flow)
+    */
 
     /**
      * Method setOutFlow
@@ -336,10 +353,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#getFaultInFlow()
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#getFaultInFlow()
+    */
 
     /**
      * Method getFaultInFlow
@@ -351,10 +368,10 @@
     }
 
     /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.axis.description.FlowInclude#setFaultInFlow(org.apache.axis.description.Flow)
-     */
+    * (non-Javadoc)
+    *
+    * @see org.apache.axis.description.FlowInclude#setFaultInFlow(org.apache.axis.description.Flow)
+    */
 
     /**
      * Method setFaultInFlow
@@ -403,8 +420,8 @@
             // serviceContext);
         } else {
             serviceContext =
-                (ServiceContext) msgContext.getSystemContext().getServiceContext(
-                    msgContext.getServiceInstanceID());
+                    (ServiceContext) msgContext.getSystemContext().getServiceContext(
+                            msgContext.getServiceInstanceID());
         }
 
         return serviceContext;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java?rev=179193&r1=179192&r2=179193&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
Mon May 30 23:31:35 2005
@@ -328,7 +328,7 @@
             for (Iterator iterator = engagedModules.iterator(); iterator.hasNext();) {
                 QName qName = (QName) iterator.next();
                 if(moduleref.equals(qName)){
-                    throw new AxisFault(moduleref.getLocalPart()+ " module alredy engaged
globally" +
+                    throw new AxisFault(moduleref.getLocalPart()+ " module has alredy engaged
globally" +
                             "  operation terminated !!!");
                 }
             }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java?rev=179193&r1=179192&r2=179193&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/phaseresolver/PhaseResolver.java
Mon May 30 23:31:35 2005
@@ -135,6 +135,7 @@
                             break;
                         }
                 }
+                axisService.addToEngagModuleList(modulename);
             } else {
                 throw new PhaseException("referance to invalid module " + modulename.getLocalPart()
+ " by server.xml");
             }
@@ -328,6 +329,7 @@
         for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
             ServiceDescription serviceDescription = (ServiceDescription) iterator.next();
             engageModuleToServiceFromGlobal(serviceDescription, module);
+            serviceDescription.addToEngagModuleList(module.getName());
         }
     }
 
@@ -403,6 +405,7 @@
                     }
                 }
             }
+            opDesc.addToEngageModuleList(module.getName());
         }
     }
 
@@ -483,6 +486,7 @@
         for (Iterator iterator = opCol.iterator(); iterator.hasNext();) {
             OperationDescription opDesc = (OperationDescription) iterator.next();
             engageModuleToOperation(opDesc,module);
+            opDesc.addToEngageModuleList(module.getName());
         }
     }
 



Mime
View raw message