You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/12/09 13:01:39 UTC

svn commit: r724668 - in /cxf/trunk/rt/frontend: jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Author: dkulp
Date: Tue Dec  9 04:01:38 2008
New Revision: 724668

URL: http://svn.apache.org/viewvc?rev=724668&view=rev
Log:
[CXF-1936] Make sure async methods are bound

Modified:
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=724668&r1=724667&r2=724668&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Tue Dec  9 04:01:38 2008
@@ -210,6 +210,17 @@
         o.setProperty(METHOD, method);
         initializeWrapping(o, method);
 
+        bindOperation(o, method);
+
+        // rpc out-message-part-info class mapping
+        Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION);
+
+        initializeClassInfo(o, method, op == null ? null
+            : CastUtils.cast(op.getParameterOrdering(), String.class));
+    }
+    
+    protected void bindOperation(OperationInfo op, Method method) {
+        
         try {
             // Find the Async method which returns a Response
             Method responseMethod = method.getDeclaringClass().getDeclaredMethod(method.getName() + "Async",
@@ -224,21 +235,16 @@
                 .getDeclaredMethod(method.getName() + "Async",
                                    asyncHandlerParams.toArray(new Class<?>[asyncHandlerParams.size()]));
 
-            getMethodDispatcher().bind(o, method, responseMethod, futureMethod);
+            getMethodDispatcher().bind(op, method, responseMethod, futureMethod);
 
         } catch (SecurityException e) {
             throw new ServiceConstructionException(e);
         } catch (NoSuchMethodException e) {
-            getMethodDispatcher().bind(o, method);
+            getMethodDispatcher().bind(op, method);
         }
-
-        // rpc out-message-part-info class mapping
-        Operation op = (Operation)o.getProperty(WSDLServiceBuilder.WSDL_OPERATION);
-
-        initializeClassInfo(o, method, op == null ? null
-            : CastUtils.cast(op.getParameterOrdering(), String.class));
     }
 
+
     @Override
     protected void initializeWSDLOperations() {
         if (implInfo.isWebServiceProvider()) {

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=724668&r1=724667&r2=724668&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Tue Dec  9 04:01:38 2008
@@ -553,7 +553,7 @@
 
         if (initializeClassInfo(o, method, op == null ? null
             : CastUtils.cast(op.getParameterOrdering(), String.class))) {
-            getMethodDispatcher().bind(o, method);
+            bindOperation(o, method);
             o.setProperty(ReflectionServiceFactoryBean.METHOD, method);
         } else {
             LOG.log(Level.WARNING, "NO_METHOD_FOR_OP", o.getName());
@@ -800,10 +800,14 @@
             createMessageParts(intf, op, m);
         }
 
-        getMethodDispatcher().bind(op, m);
+        bindOperation(op, m);
 
         return op;
     }
+    
+    protected void bindOperation(OperationInfo op, Method m) {
+        getMethodDispatcher().bind(op, m);
+    }
 
     protected void initializeWrappedSchema(ServiceInfo serviceInfo) {
         for (OperationInfo op : serviceInfo.getInterface().getOperations()) {