cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From egl...@apache.org
Subject svn commit: r549120 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
Date Wed, 20 Jun 2007 14:35:12 GMT
Author: eglynn
Date: Wed Jun 20 07:35:11 2007
New Revision: 549120

URL: http://svn.apache.org/viewvc?view=rev&rev=549120
Log:
Fix for the post-invocation BindingProvider.ENDPOINT_ADDRESS_PROPERTY reset semantics in JaxWsClientProxy

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java?view=diff&rev=549120&r1=549119&r2=549120
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsClientProxy.java
Wed Jun 20 07:35:11 2007
@@ -85,6 +85,7 @@
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
 
         Endpoint endpoint = getClient().getEndpoint();
+        String address = endpoint.getEndpointInfo().getAddress();
         MethodDispatcher dispatcher = (MethodDispatcher)endpoint.getService().get(
                                                                                   MethodDispatcher.class
                                                                                       .getName());
@@ -172,7 +173,7 @@
                 throw new WebServiceException(ex);
             }
         } finally {
-            if (endpoint != getClient().getEndpoint()) {
+            if (addressChanged(address)) {
                 setupEndpointAddressContext(getClient().getEndpoint());
             }
         }
@@ -189,6 +190,12 @@
         }
         return result;
 
+    }
+    
+    private boolean addressChanged(String address) {
+        return !(address == null
+                 || getClient().getEndpoint().getEndpointInfo() == null
+                 || address.equals(getClient().getEndpoint().getEndpointInfo().getAddress()));
     }
 
     private Object invokeAsync(Method method, BindingOperationInfo oi, Object[] params,



Mime
View raw message