geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r701606 - in /geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main: java/org/apache/geronimo/axis2/ resources/META-INF/
Date Sat, 04 Oct 2008 06:07:08 GMT
Author: gawor
Date: Fri Oct  3 23:07:07 2008
New Revision: 701606

URL: http://svn.apache.org/viewvc?rev=701606&view=rev
Log:
discover and load addressing module (GERONIMO-4327)

Added:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
  (with props)
Modified:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/resources/META-INF/geronimo-axis2.xml

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java?rev=701606&r1=701605&r2=701606&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/Axis2WebServiceContainer.java
Fri Oct  3 23:07:07 2008
@@ -117,7 +117,8 @@
         
         Axis2ConfigGBean.registerClientConfigurationFactory();
         
-        configurationContext = ConfigurationContextFactory.createBasicConfigurationContext("META-INF/geronimo-axis2.xml");
+        GeronimoConfigurator configurator = new GeronimoConfigurator("META-INF/geronimo-axis2.xml");
+        configurationContext = ConfigurationContextFactory.createConfigurationContext(configurator);
 
         // check to see if the wsdlLocation property is set in portInfo,
         // if not checking if wsdlLocation exists in annotation
@@ -130,6 +131,7 @@
         }
 
         AxisServiceGenerator serviceGen = createServiceGenerator();
+        serviceGen.setConfigurationContext(configurationContext);
         if (portInfo.getWsdlFile() != null && !portInfo.getWsdlFile().equals(""))
{
             // WSDL file has been provided
             service = serviceGen.getServiceFromWSDL(portInfo, endpointClass, configurationBaseUrl);

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java?rev=701606&r1=701605&r2=701606&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/AxisServiceGenerator.java
Fri Oct  3 23:07:07 2008
@@ -39,6 +39,7 @@
 import javax.xml.ws.WebServiceException;
 
 import org.apache.axis2.Constants;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
@@ -72,6 +73,7 @@
     private static final Logger log = LoggerFactory.getLogger(AxisServiceGenerator.class);
 
     private MessageReceiver messageReceiver;
+    private ConfigurationContext configurationContext;
     
     public AxisServiceGenerator(){
         this.messageReceiver = new JAXWSMessageReceiver();
@@ -81,6 +83,10 @@
         this.messageReceiver = messageReceiver;
     }
    
+    public void setConfigurationContext(ConfigurationContext configurationContext) {
+        this.configurationContext = configurationContext;
+    }
+    
     public AxisService getServiceFromClass(Class endpointClass) throws Exception {
         ServiceDescription serviceDescription = 
             DescriptionFactory.createServiceDescription(endpointClass);        
@@ -228,7 +234,7 @@
     }
         
     private EndpointDescription getEndpointDescription(HashMap<String, DescriptionBuilderComposite>
dbcMap) {
-        List<ServiceDescription> serviceDescList = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);
+        List<ServiceDescription> serviceDescList = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap,
this.configurationContext);
         if (serviceDescList == null || serviceDescList.isEmpty()) {
             throw new RuntimeException("No service");
         }

Added: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java?rev=701606&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
(added)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
Fri Oct  3 23:07:07 2008
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.geronimo.axis2;
+
+import java.io.InputStream;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.deployment.DeploymentEngine;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisConfigurator;
+import org.apache.axis2.util.Loader;
+
+public class GeronimoConfigurator extends DeploymentEngine implements AxisConfigurator {
+
+    private String resourceName;
+
+    public GeronimoConfigurator(String resourceName) throws AxisFault {
+        this.resourceName = resourceName;
+    }
+
+    public synchronized AxisConfiguration getAxisConfiguration() throws AxisFault {
+        InputStream configStream = Loader.getResourceAsStream(this.resourceName);
+        if (configStream == null) {
+            throw new AxisFault("Unable to find configuration: " + this.resourceName);
+        }
+        this.axisConfig = populateAxisConfiguration(configStream);
+      
+        loadFromClassPath();
+        
+        this.axisConfig.setConfigurator(this);
+        return this.axisConfig;
+    }
+
+    public void engageGlobalModules() throws AxisFault {
+        engageModules();
+    }
+
+    public void loadServices() {
+    }
+}

Propchange: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoConfigurator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/resources/META-INF/geronimo-axis2.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/resources/META-INF/geronimo-axis2.xml?rev=701606&r1=701605&r2=701606&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/resources/META-INF/geronimo-axis2.xml
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/resources/META-INF/geronimo-axis2.xml
Fri Oct  3 23:07:07 2008
@@ -180,46 +180,36 @@
                 <order phase="Transport"/>
             </handler>
         </phase>
+        <phase name="Addressing">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                <order phase="Addressing"/>
+            </handler>
+        </phase>
         <phase name="Security"/>
         <phase name="PreDispatch"/>
         <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
             <handler name="RequestURIOperationDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="HTTPLocationBasedDispatcher"
                      class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
 
             <handler name="GenericProviderDispatcher"
                      class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="MustUnderstandValidationDispatcher"
                      class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher">
-                <order phase="Dispatch"/>
             </handler>
         </phase>
         <phase name="RMPhase"/>
@@ -243,45 +233,36 @@
         <phase name="Security"/>
     </phaseOrder>
     <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
         <phase name="PreDispatch"/>
         <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
             <handler name="RequestURIOperationDispatcher"
                      class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="HTTPLocationBasedDispatcher"
                      class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher">
-                <order phase="Dispatch"/>
             </handler>
 
             <handler name="GenericProviderDispatcher"
                      class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher">
-                <order phase="Dispatch"/>
             </handler>
-
             <handler name="MustUnderstandValidationDispatcher"
                      class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher">
-                <order phase="Dispatch"/>
             </handler>
         </phase>
         <phase name="RMPhase"/>
@@ -300,4 +281,4 @@
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>
-</axisconfig>
\ No newline at end of file
+</axisconfig>



Mime
View raw message