geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r701164 - in /geronimo/server/trunk: ./ plugins/axis2/axis2/src/main/history/ plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/ plugins/axis2/geronimo-axis2/ plugins/axis2/geronimo-axis2/src/main/java/org/apache/...
Date Thu, 02 Oct 2008 15:44:39 GMT
Author: gawor
Date: Thu Oct  2 08:44:39 2008
New Revision: 701164

URL: http://svn.apache.org/viewvc?rev=701164&view=rev
Log:
initial step to upgrade to latest Axis2 for JAX-WS 2.1 support (GERONIMO-4327)

Added:
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBAddressingSupport.java
  (with props)
Modified:
    geronimo/server/trunk/plugins/axis2/axis2/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBEndpointController.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBInterceptor.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBMessageReceiver.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBProviderDispatcher.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBServiceDispatcher.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceContainer.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/pom.xml
    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/java/org/apache/geronimo/axis2/GeronimoHandlerLifecycleManager.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOEndpointLifecycleManagerFactory.java
    geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOWebServiceContext.java
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/plugins/axis2/axis2/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/axis2/src/main/history/dependencies.xml?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/axis2/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/axis2/axis2/src/main/history/dependencies.xml Thu Oct  2
08:44:39 2008
@@ -141,4 +141,9 @@
         <artifactId>axis2-java2wsdl</artifactId>
         <type>jar</type>
     </dependency>
+    <dependency>
+        <groupId>org.apache.axis2</groupId>
+        <artifactId>axis2-transports</artifactId>
+        <type>jar</type>
+    </dependency>
 </plugin-artifact>

Added: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBAddressingSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBAddressingSupport.java?rev=701164&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBAddressingSupport.java
(added)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBAddressingSupport.java
Thu Oct  2 08:44:39 2008
@@ -0,0 +1,48 @@
+/**
+ * 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.ejb;
+
+import javax.xml.ws.EndpointReference;
+import javax.xml.ws.handler.MessageContext;
+
+import org.apache.axis2.jaxws.context.WebServiceContextImpl;
+import org.apache.openejb.core.webservices.AddressingSupport;
+import org.w3c.dom.Element;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class EJBAddressingSupport implements AddressingSupport {
+
+    private WebServiceContextImpl wsContext;
+    
+    public EJBAddressingSupport(MessageContext messageCtx) {
+        this.wsContext = new WebServiceContextImpl();
+        this.wsContext.setSoapMessageContext(messageCtx);
+    }
+
+    public EndpointReference getEndpointReference(Element... referenceParameters) {
+        return this.wsContext.getEndpointReference(referenceParameters);
+    }
+
+    public <T extends EndpointReference> T getEndpointReference(Class<T> type,

+                                                                Element... referenceParameters)
{
+        return this.wsContext.getEndpointReference(type, referenceParameters);
+    }
+    
+}

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

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

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

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBEndpointController.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBEndpointController.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBEndpointController.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBEndpointController.java
Thu Oct  2 08:44:39 2008
@@ -21,6 +21,7 @@
 import javax.interceptor.InvocationContext;
 import javax.xml.ws.Provider;
 
+import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.server.EndpointController;
 import org.apache.axis2.jaxws.server.dispatcher.EndpointDispatcher;
 
@@ -33,7 +34,9 @@
     }
     
     @Override
-    protected EndpointDispatcher getEndpointDispatcher(Class serviceImplClass, Object serviceInstance)
+    protected EndpointDispatcher getEndpointDispatcher(MessageContext mc, 
+                                                       Class serviceImplClass, 
+                                                       Object serviceInstance) 
         throws Exception {    
         if (Provider.class.isAssignableFrom(serviceImplClass)) {
             return new EJBProviderDispatcher(serviceImplClass, this.invContext);

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBInterceptor.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBInterceptor.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBInterceptor.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBInterceptor.java
Thu Oct  2 08:44:39 2008
@@ -27,10 +27,10 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.WSDL2Constants;
 import org.apache.axis2.engine.AxisEngine;
-import org.apache.axis2.jaxws.core.InvocationContext;
 import org.apache.axis2.jaxws.core.InvocationContextFactory;
 import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.message.util.MessageUtils;
+import org.apache.axis2.jaxws.server.EndpointInvocationContext;
 import org.apache.axis2.jaxws.server.JAXWSMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants.WSDL20_2004_Constants;
 import org.apache.axis2.wsdl.WSDLConstants.WSDL20_2006Constants;
@@ -60,7 +60,7 @@
         EJBEndpointController controller = new EJBEndpointController(invContext);
                
         Binding binding = (Binding)this.requestMsgCtx.getAxisMessageContext().getProperty(JAXWSMessageReceiver.PARAM_BINDING);
-        InvocationContext ic = InvocationContextFactory.createInvocationContext(binding);
+        EndpointInvocationContext ic = InvocationContextFactory.createEndpointInvocationContext(binding);
         ic.setRequestMessageContext(this.requestMsgCtx);
         
         controller.invoke(ic);
@@ -89,9 +89,7 @@
                                     axisResponseMsgCtx);
             } else {
                 //Create the AxisEngine for the reponse and send it.
-                AxisEngine engine =
-                        new AxisEngine(axisResponseMsgCtx.getConfigurationContext());
-                engine.send(axisResponseMsgCtx);
+                AxisEngine.send(axisResponseMsgCtx);
             }
         }    
         

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBMessageReceiver.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBMessageReceiver.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBMessageReceiver.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBMessageReceiver.java
Thu Oct  2 08:44:39 2008
@@ -76,7 +76,8 @@
         EJBInterceptor interceptor = new EJBInterceptor(this.container, requestMsgCtx);
 
         SoapMessageContext jaxwsContext = new SoapMessageContext(requestMsgCtx);
-        Object[] arguments = { jaxwsContext, interceptor };
+        EJBAddressingSupport wsaSupport = new EJBAddressingSupport(jaxwsContext);
+        Object[] arguments = { jaxwsContext, interceptor, wsaSupport };
         
         RpcContainer container = (RpcContainer) this.deploymentInfo.getContainer();
 

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBProviderDispatcher.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBProviderDispatcher.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBProviderDispatcher.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBProviderDispatcher.java
Thu Oct  2 08:44:39 2008
@@ -18,11 +18,11 @@
  */
 package org.apache.geronimo.axis2.ejb;
 
+import java.lang.reflect.Method;
+
 import javax.interceptor.InvocationContext;
-import javax.xml.ws.Provider;
 
 import org.apache.axis2.jaxws.ExceptionFactory;
-import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.server.dispatcher.ProviderDispatcher;
 
 public class EJBProviderDispatcher extends ProviderDispatcher {
@@ -44,10 +44,8 @@
     }
 
     @Override
-    protected Object invokeProvider(MessageContext ctx,
-                                    Provider provider,
-                                    Object input) throws Exception {
-        this.invContext.setParameters(new Object[] {input});
+    protected Object invokeTargetOperation(Method method, Object[] args) throws Throwable
{
+        this.invContext.setParameters(args);
         return this.invContext.proceed();
     }
     

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBServiceDispatcher.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBServiceDispatcher.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBServiceDispatcher.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBServiceDispatcher.java
Thu Oct  2 08:44:39 2008
@@ -22,7 +22,6 @@
 
 import javax.interceptor.InvocationContext;
 
-import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher;
 
 public class EJBServiceDispatcher extends JavaBeanDispatcher {
@@ -35,10 +34,7 @@
     }
 
     @Override
-    protected Object invokeService(MessageContext ctx,
-                                   Method method, 
-                                   Object obj,
-                                   Object args[]) throws Exception {
+    protected Object invokeTargetOperation(Method method, Object[] args) throws Throwable
{
         this.invContext.setParameters(args);
         return this.invContext.proceed();
     }

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceContainer.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceContainer.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceContainer.java
Thu Oct  2 08:44:39 2008
@@ -25,7 +25,6 @@
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.WebServiceException;
 
-import org.apache.axis2.util.JavaUtils;
 import org.apache.geronimo.axis2.Axis2WebServiceContainer;
 import org.apache.geronimo.axis2.AxisServiceGenerator;
 import org.apache.geronimo.jaxws.JAXWSAnnotationProcessor;

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/pom.xml?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/pom.xml (original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/pom.xml Thu Oct  2 08:44:39 2008
@@ -111,6 +111,11 @@
         </dependency>
         
         <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>commons-httpclient</groupId>
             <artifactId>commons-httpclient</artifactId>
         </dependency>

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=701164&r1=701163&r2=701164&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
Thu Oct  2 08:44:39 2008
@@ -433,24 +433,24 @@
     protected void configureHandlers() throws Exception {
         EndpointDescription desc = AxisServiceGenerator.getEndpointDescription(this.service);
         if (desc == null) {
-            this.binding = new BindingImpl("");
-        } else {
-            String xml = this.portInfo.getHandlersAsXML();
-            HandlerChainsType handlerChains = null;
-            if (xml != null) {
-                ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
-                handlerChains = DescriptionUtils.loadHandlerChains(in);
-                desc.setHandlerChain(handlerChains);
-            }
-            
-            if (LOG.isDebugEnabled()) {
-                logHandlers(desc.getHandlerChain());
-            }
-            
-            this.binding = BindingUtils.createBinding(desc);
+            throw new RuntimeException("No EndpointDescription for service");
+        }
+        
+        String xml = this.portInfo.getHandlersAsXML();
+        HandlerChainsType handlerChains = null;
+        if (xml != null) {
+            ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
+            handlerChains = DescriptionUtils.loadHandlerChains(in, null);
+            desc.setHandlerChain(handlerChains);
+        }
             
-            DescriptionUtils.registerHandlerHeaders(desc.getAxisService(), this.binding.getHandlerChain());
           
+        if (LOG.isDebugEnabled()) {
+            logHandlers(desc.getHandlerChain());
         }
+            
+        this.binding = BindingUtils.createBinding(desc);
+        
+        DescriptionUtils.registerHandlerHeaders(desc.getAxisService(), this.binding.getHandlerChain());
           
     }
 
     private void logHandlers(HandlerChainsType handlerChains) {

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=701164&r1=701163&r2=701164&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
Thu Oct  2 08:44:39 2008
@@ -247,7 +247,8 @@
             this.def = def;
         }
         
-        public WsdlComposite generateWsdl(String implClass, String bindingType) throws WebServiceException
{
+        public WsdlComposite generateWsdl(String implClass, EndpointDescription endpointDesc)
+            throws WebServiceException {
             // Need WSDL generation code
             WsdlComposite composite = new WsdlComposite();
             composite.setWsdlFileName(implClass);

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoHandlerLifecycleManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoHandlerLifecycleManager.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoHandlerLifecycleManager.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/GeronimoHandlerLifecycleManager.java
Thu Oct  2 08:44:39 2008
@@ -46,5 +46,9 @@
 
     public void invokePreDestroy() throws LifecycleException {
     }
+
+    public void destroyHandlerInstance(MessageContext cxt, Handler handler)
+        throws LifecycleException, ResourceInjectionException {
+    }
    
 }

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/client/Axis2ClientConfigurationFactory.java
Thu Oct  2 08:44:39 2008
@@ -42,7 +42,7 @@
     }
     
     public ConfigurationContext getClientConfigurationContext() {
-        ClassLoader cl = ClassLoaderUtils.getContextClassLoader();
+        ClassLoader cl = ClassLoaderUtils.getContextClassLoader(null);
         if (cl == null) {
             if (this.reuseConfigurationContext) {
                 cl = ClientConfigurationFactory.class.getClassLoader();

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOEndpointLifecycleManagerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOEndpointLifecycleManagerFactory.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOEndpointLifecycleManagerFactory.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOEndpointLifecycleManagerFactory.java
Thu Oct  2 08:44:39 2008
@@ -22,7 +22,7 @@
 import org.apache.axis2.jaxws.server.endpoint.lifecycle.EndpointLifecycleManager;
 import org.apache.axis2.jaxws.server.endpoint.lifecycle.factory.EndpointLifecycleManagerFactory;
 
-public class POJOEndpointLifecycleManagerFactory extends EndpointLifecycleManagerFactory
{
+public class POJOEndpointLifecycleManagerFactory implements EndpointLifecycleManagerFactory
{
 
     private EndpointLifecycleManager lifecycleManager;
 
@@ -30,13 +30,11 @@
         this.lifecycleManager = new POJOEndpointLifecycleManager();        
     }
 
-    @Override
     public EndpointLifecycleManager createEndpointLifecycleManager(Object endpointInstance)
             throws EndpointLifecycleException {
         throw new UnsupportedOperationException();
     }
 
-    @Override
     public EndpointLifecycleManager createEndpointLifecycleManager() {
         return this.lifecycleManager;
     }

Modified: geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOWebServiceContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOWebServiceContext.java?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOWebServiceContext.java
(original)
+++ geronimo/server/trunk/plugins/axis2/geronimo-axis2/src/main/java/org/apache/geronimo/axis2/pojo/POJOWebServiceContext.java
Thu Oct  2 08:44:39 2008
@@ -19,60 +19,61 @@
 
 import java.security.Principal;
 
-import javax.servlet.http.HttpServletRequest;
 import javax.xml.ws.EndpointReference;
 import javax.xml.ws.WebServiceContext;
 import javax.xml.ws.handler.MessageContext;
 
+import org.apache.axis2.jaxws.context.WebServiceContextImpl;
 import org.w3c.dom.Element;
 
 /**
- * Implementation of WebServiceContext for POJO WS to ensure that getUserPrincipal()
- * and isUserInRole() are properly handled.
+ * Implementation of WebServiceContext that uses ThreadLocal to associate MessageContext
with 
+ * the thread.
  * 
  * @version $Rev$ $Date$
  */
 public class POJOWebServiceContext implements WebServiceContext {
 
-    private static ThreadLocal<MessageContext> context = new ThreadLocal<MessageContext>();
+    private static ThreadLocal<WebServiceContextImpl> context = 
+        new ThreadLocal<WebServiceContextImpl>();
     
     public POJOWebServiceContext() {        
     }
         
     public final MessageContext getMessageContext() {
-        return context.get();
-    }
-
-    private HttpServletRequest getHttpServletRequest() {
-        MessageContext ctx = getMessageContext();
-        return (ctx != null) ? (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST)
: null;
+        WebServiceContextImpl wsContext = context.get();
+        return (wsContext == null) ? null : wsContext.getMessageContext();
     }
 
     public final Principal getUserPrincipal() {
-        HttpServletRequest request = getHttpServletRequest();
-        return (request != null) ? request.getUserPrincipal() : null;
+        WebServiceContextImpl wsContext = context.get();
+        return (wsContext == null) ? null : wsContext.getUserPrincipal();
     }
 
     public final boolean isUserInRole(String user) {
-        HttpServletRequest request = getHttpServletRequest();
-        return (request != null) ? request.isUserInRole(user) : false;
+        WebServiceContextImpl wsContext = context.get();
+        return (wsContext == null) ? null : wsContext.isUserInRole(user);
     }
             
+    public final EndpointReference getEndpointReference(Element... referenceParameters) {
+        WebServiceContextImpl wsContext = context.get();
+        return (wsContext == null) ? null : wsContext.getEndpointReference(referenceParameters);
+    }
+    
+    public final <T extends EndpointReference> T getEndpointReference(Class<T>
clazz,
+                                                                      Element... referenceParameters)
{
+        WebServiceContextImpl wsContext = context.get();
+        return (wsContext == null) ? null : wsContext.getEndpointReference(clazz, referenceParameters);
+    }
+    
     public static void setMessageContext(MessageContext ctx) {
-        context.set(ctx);
+        WebServiceContextImpl wsContext = new WebServiceContextImpl();
+        wsContext.setSoapMessageContext(ctx);
+        context.set(wsContext);
     }
 
     public static void clear() {
         context.set(null);
     }
-
-    public EndpointReference getEndpointReference(Element... referenceParameters) {
-        throw new UnsupportedOperationException();
-    }
-    
-    public <T extends EndpointReference> T getEndpointReference(Class<T> clazz,
-                                                                Element... referenceParameters)
{
-        throw new UnsupportedOperationException();
-    }
     
 }

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=701164&r1=701163&r2=701164&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Thu Oct  2 08:44:39 2008
@@ -76,8 +76,8 @@
         <tomcatVersion>6.0.18</tomcatVersion>
         <tranqlVendorsVersion>1.4</tranqlVendorsVersion>
         <cxfVersion>2.1.3-SNAPSHOT</cxfVersion>
-        <axis2Version>1.3</axis2Version>
-        <axiomVersion>1.2.5</axiomVersion>
+        <axis2Version>SNAPSHOT</axis2Version>
+        <axiomVersion>SNAPSHOT</axiomVersion>
         <springVersion>2.0.5</springVersion>
         <plutoVersion>1.1.6-G643117</plutoVersion>
         <openjpaVersion>1.2.0</openjpaVersion>
@@ -768,7 +768,7 @@
             <dependency>
                 <groupId>xml-resolver</groupId>
                 <artifactId>xml-resolver</artifactId>
-                <version>1.1</version>
+                <version>1.2</version>
             </dependency>
 
             <dependency>
@@ -998,7 +998,7 @@
             <dependency>
                 <groupId>commons-httpclient</groupId>
                 <artifactId>commons-httpclient</artifactId>
-                <version>3.0.1</version>
+                <version>3.1</version>
                 <exclusions>
                     <exclusion>
                         <groupId>commons-logging</groupId>
@@ -1758,7 +1758,11 @@
                 <exclusions>
                     <exclusion>
                         <groupId>org.apache.woden</groupId>
-                        <artifactId>woden</artifactId>
+                        <artifactId>woden-api</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.woden</groupId>
+                        <artifactId>woden-impl-dom</artifactId>
                     </exclusion>
                     <exclusion>
                         <groupId>commons-logging</groupId>
@@ -1769,6 +1773,10 @@
                         <artifactId>mail</artifactId>
                     </exclusion>
                     <exclusion>
+                        <groupId>javax.servlet</groupId>
+                        <artifactId>servlet-api</artifactId>
+                    </exclusion>
+                    <exclusion>
                         <groupId>xerces</groupId>
                         <artifactId>xercesImpl</artifactId>
                     </exclusion>
@@ -1914,7 +1922,7 @@
             <dependency>
                 <groupId>org.apache.httpcomponents</groupId>
                 <artifactId>httpcore</artifactId>
-                <version>4.0-alpha5</version>
+                <version>4.0-beta1</version>
             </dependency>
 
             <dependency>
@@ -1942,6 +1950,10 @@
                         <groupId>xml-apis</groupId>
                         <artifactId>xml-apis</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-javamail_1.4_spec</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
 
@@ -1966,6 +1978,10 @@
                         <groupId>stax</groupId>
                         <artifactId>stax-api</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-javamail_1.4_spec</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
 
@@ -1990,6 +2006,10 @@
                         <groupId>stax</groupId>
                         <artifactId>stax-api</artifactId>
                     </exclusion>
+                    <exclusion>
+                        <groupId>org.apache.geronimo.specs</groupId>
+                        <artifactId>geronimo-javamail_1.4_spec</artifactId>
+                    </exclusion>
                 </exclusions>
             </dependency>
 



Mime
View raw message