axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r544257 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server: EndpointController.java dispatcher/JavaBeanDispatcher.java dispatcher/ProviderDispatcher.java
Date Mon, 04 Jun 2007 20:44:35 GMT
Author: dims
Date: Mon Jun  4 13:44:33 2007
New Revision: 544257

URL: http://svn.apache.org/viewvc?view=rev&rev=544257
Log:
Fix for AXIS2-2767 - Minor extensibility improvements

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?view=diff&rev=544257&r1=544256&r2=544257
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
Mon Jun  4 13:44:33 2007
@@ -211,7 +211,7 @@
     /*
       * Get the appropriate EndpointDispatcher for a given service endpoint.
       */
-    private EndpointDispatcher getEndpointDispatcher(Class serviceImplClass, Object serviceInstance)
+    protected EndpointDispatcher getEndpointDispatcher(Class serviceImplClass, Object serviceInstance)
             throws Exception {
         EndpointDispatcherFactory factory = 
             (EndpointDispatcherFactory)FactoryRegistry.getFactory(EndpointDispatcherFactory.class);
       

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java?view=diff&rev=544257&r1=544256&r2=544257
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaBeanDispatcher.java
Mon Jun  4 13:44:33 2007
@@ -86,7 +86,7 @@
         Throwable fault = null;
         Object response = null;
         try {
-            response = target.invoke(serviceInstance, methodInputParams);
+            response = invokeService(mc, target, serviceInstance, methodInputParams);
         } catch (Exception e) {
             faultThrown = true;
             fault = e;
@@ -147,6 +147,13 @@
         return responseMsgCtx;
     }
 
+    protected Object invokeService(MessageContext ctx,
+                                   Method method, 
+                                   Object obj,
+                                   Object args[]) throws Exception {
+        return method.invoke(obj, args);
+    }
+    
     private void initialize(MessageContext mc) {
         mc.setOperationName(mc.getAxisMessageContext().getAxisOperation().getName());
         endpointDesc = mc.getEndpointDescription();

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java?view=diff&rev=544257&r1=544256&r2=544257
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ProviderDispatcher.java
Mon Jun  4 13:44:33 2007
@@ -48,7 +48,7 @@
 import javax.xml.ws.soap.SOAPBinding;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
-import java.security.PrivilegedAction;
+import java.security.PrivilegedExceptionAction;
 
 /**
  * The ProviderDispatcher is used to invoke instances of a target endpoint that implement
the {@link
@@ -85,7 +85,7 @@
     /* (non-Javadoc)
     * @see org.apache.axis2.jaxws.server.EndpointDispatcher#execute()
     */
-    public MessageContext invoke(MessageContext mc) throws Exception {
+    public MessageContext invoke(final MessageContext mc) throws Exception {
         if (log.isDebugEnabled()) {
             log.debug("Preparing to invoke javax.xml.ws.Provider based endpoint");
         }
@@ -173,9 +173,9 @@
         Object responseParamValue = null;
         try {
             responseParamValue = (Object)org.apache.axis2.java.security.AccessController
-                    .doPrivileged(new PrivilegedAction() {
-                        public Object run() {
-                            return providerInstance.invoke(input);
+                    .doPrivileged(new PrivilegedExceptionAction() {
+                        public Object run() throws Exception {
+                            return invokeProvider(mc, providerInstance, input);
                         }
                     });
         } catch (Exception e) {
@@ -222,6 +222,12 @@
         return responseMsgCtx;
     }
 
+    protected Object invokeProvider(MessageContext ctx,
+                                    Provider provider,
+                                    Object input) throws Exception {
+        return provider.invoke(input);
+    }
+    
     /**
      * Get the endpoint provider instance
      *



---------------------------------------------------------------------
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