Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 78939 invoked from network); 20 Jun 2007 14:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2007 14:35:34 -0000 Received: (qmail 60432 invoked by uid 500); 20 Jun 2007 14:35:37 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 60375 invoked by uid 500); 20 Jun 2007 14:35:36 -0000 Mailing-List: contact cxf-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-commits@incubator.apache.org Received: (qmail 60366 invoked by uid 99); 20 Jun 2007 14:35:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2007 07:35:36 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2007 07:35:32 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 7D9211A981A; Wed, 20 Jun 2007 07:35:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cxf-commits@incubator.apache.org From: eglynn@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070620143512.7D9211A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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,