cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r467284 - in /incubator/cxf/trunk: rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
Date Tue, 24 Oct 2006 09:03:00 GMT
Author: ningjiang
Date: Tue Oct 24 02:03:00 2006
New Revision: 467284

URL: http://svn.apache.org/viewvc?view=rev&rev=467284
Log:
[CXF-164] made EndpointInvocationHandler support Object method invoke

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java?view=diff&rev=467284&r1=467283&r2=467284
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHandler.java
Tue Oct 24 02:03:00 2006
@@ -60,16 +60,15 @@
     }
 
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-        if ("hashCode".equals(method.getName())) {
-            return this.hashCode();
-        }
+       
         MethodDispatcher dispatcher = 
             (MethodDispatcher)endpoint.getService().get(MethodDispatcher.class.getName());
         BindingOperationInfo oi = dispatcher.getBindingOperation(method, endpoint);
         if (oi == null) {
-            // check for method on BindingProvider
+            // check for method on BindingProvider and Object
             if (method.getDeclaringClass().equals(BindingProvider.class)
-                || method.getDeclaringClass().equals(BindingProviderImpl.class)) {
+                || method.getDeclaringClass().equals(BindingProviderImpl.class)
+                || method.getDeclaringClass().equals(Object.class)) {
                 return method.invoke(this);
             }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java?view=diff&rev=467284&r1=467283&r2=467284
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jca/OutBoundConnectionTest.java
Tue Oct 24 02:03:00 2006
@@ -25,6 +25,7 @@
 import javax.security.auth.Subject;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -92,6 +93,14 @@
         Subject subject = new Subject();
         ManagedConnection mc = managedFactory.createManagedConnection(subject, cri);    
   
         Object o = mc.getConnection(subject, cri);
+        
+        // test for the Object hash()
+        try {
+            o.hashCode();
+            o.toString();
+        } catch (WebServiceException ex) {
+            fail("The connection object should support Object method");
+        }
         
         assertTrue("returned connect does not implement Connection interface", o instanceof
Connection);
         assertTrue("returned connect does not implement Connection interface", o instanceof
Greeter);



Mime
View raw message