Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B39C3921F for ; Mon, 23 Jan 2012 20:05:53 +0000 (UTC) Received: (qmail 35402 invoked by uid 500); 23 Jan 2012 20:05:53 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 35291 invoked by uid 500); 23 Jan 2012 20:05:52 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 35284 invoked by uid 99); 23 Jan 2012 20:05:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2012 20:05:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2012 20:05:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B274D238890D for ; Mon, 23 Jan 2012 20:05:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1234963 - in /cxf/branches/2.4.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/core/src/main/java/org/apache/cxf/endpoint/ systests/ws-specs... Date: Mon, 23 Jan 2012 20:05:30 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120123200530.B274D238890D@eris.apache.org> Author: dkulp Date: Mon Jan 23 20:05:29 2012 New Revision: 1234963 URL: http://svn.apache.org/viewvc?rev=1234963&view=rev Log: Merged revisions 1234959 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes ................ r1234959 | dkulp | 2012-01-23 15:00:51 -0500 (Mon, 23 Jan 2012) | 10 lines Merged revisions 1234954 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r1234954 | dkulp | 2012-01-23 14:55:38 -0500 (Mon, 23 Jan 2012) | 2 lines [CXF-4056, CXF-4057] Fix a couple of issues with echoed WS-Addressing headers and faults causing clients to hang until a timeout. ........ ................ Added: cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImplNoAddr.java - copied unchanged from r1234959, cxf/branches/2.5.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/AddNumberImplNoAddr.java Modified: cxf/branches/2.4.x-fixes/ (props changed) cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java Propchange: cxf/branches/2.4.x-fixes/ ('svn:mergeinfo' removed) Propchange: cxf/branches/2.4.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?rev=1234963&r1=1234962&r2=1234963&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java (original) +++ cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java Mon Jan 23 20:05:29 2012 @@ -394,7 +394,7 @@ public class SoapBindingFactory extends sb.getOutInterceptors().add(new AttachmentOutInterceptor()); sb.getOutInterceptors().add(new StaxOutInterceptor()); - sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor()); + sb.getOutInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE); if (SoapBindingConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) { sb.getInInterceptors().add(new RPCInInterceptor()); @@ -422,6 +422,7 @@ public class SoapBindingFactory extends sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor()); sb.getOutInterceptors().add(new SoapOutInterceptor(getBus())); sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus())); + sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE); // REVISIT: The phase interceptor chain seems to freak out if this added // first. Not sure what the deal is at the moment, I suspect the Modified: cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java?rev=1234963&r1=1234962&r2=1234963&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java (original) +++ cxf/branches/2.4.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderOutFilterInterceptor.java Mon Jan 23 20:05:29 2012 @@ -27,6 +27,7 @@ import org.apache.cxf.interceptor.Fault; import org.apache.cxf.phase.Phase; public class SoapHeaderOutFilterInterceptor extends AbstractSoapInterceptor { + public static final SoapHeaderOutFilterInterceptor INSTANCE = new SoapHeaderOutFilterInterceptor(); public SoapHeaderOutFilterInterceptor() { super(Phase.PRE_LOGICAL); Modified: cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?rev=1234963&r1=1234962&r2=1234963&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original) +++ cxf/branches/2.4.x-fixes/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Mon Jan 23 20:05:29 2012 @@ -821,7 +821,8 @@ public class ClientImpl } finally { BusFactory.setThreadDefaultBus(origBus); synchronized (message.getExchange()) { - if (!isPartialResponse(message)) { + if (!isPartialResponse(message) + || message.getContent(Exception.class) != null) { message.getExchange().put(FINISHED, Boolean.TRUE); message.getExchange().setInMessage(message); message.getExchange().notifyAll(); Modified: cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java?rev=1234963&r1=1234962&r2=1234963&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/WSAFromJavaTest.java Mon Jan 23 20:05:29 2012 @@ -25,6 +25,7 @@ import java.util.Map; import javax.xml.ws.BindingProvider; import javax.xml.ws.soap.SOAPFaultException; +import org.apache.cxf.feature.LoggingFeature; import org.apache.cxf.systest.ws.AbstractWSATestBase; import org.apache.cxf.systest.ws.addr_fromjava.client.AddNumberImpl; import org.apache.cxf.systest.ws.addr_fromjava.client.AddNumberImplService; @@ -44,7 +45,7 @@ public class WSAFromJavaTest extends Abs @BeforeClass public static void startServers() throws Exception { - assertTrue("server did not launch correctly", launchServer(Server.class)); + assertTrue("server did not launch correctly", launchServer(Server.class, true)); } @Test @@ -172,4 +173,23 @@ public class WSAFromJavaTest extends Abs assertTrue(e.getMessage().contains("Unexpected wrapper")); } } + + @Test + public void testFaultFromNonAddressService() throws Exception { + new LoggingFeature().initialize(this.getBus()); + AddNumberImpl port = getPort(); + java.util.Map requestContext = ((BindingProvider)port).getRequestContext(); + requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, + "http://localhost:" + PORT + "/AddNumberImplPort-noaddr"); + + long start = System.currentTimeMillis(); + port.addNumbers(1, 2); + try { + port.addNumbers3(-1, -1); + } catch (Exception ex) { + //ignore, expected + } + long end = System.currentTimeMillis(); + assertTrue((end - start) < 50000); + } } \ No newline at end of file Modified: cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java?rev=1234963&r1=1234962&r2=1234963&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java (original) +++ cxf/branches/2.4.x-fixes/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/addr_fromjava/server/Server.java Mon Jan 23 20:05:29 2012 @@ -29,11 +29,13 @@ public class Server extends AbstractBusT protected void run() { Object implementor = new AddNumberImpl(); String address = "http://localhost:" + PORT + "/AddNumberImplPort"; - EndpointImpl ep = new EndpointImpl(implementor); - ep.getFeatures().add(new WSAddressingFeature()); ep.publish(address); + + ep = new EndpointImpl(new AddNumberImplNoAddr()); + ep.publish(address + "-noaddr"); + } public static void main(String[] args) {