Return-Path: Delivered-To: apmail-incubator-cxf-commits-archive@locus.apache.org Received: (qmail 58445 invoked from network); 31 Jan 2007 13:48:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jan 2007 13:48:23 -0000 Received: (qmail 17159 invoked by uid 500); 31 Jan 2007 13:48:18 -0000 Delivered-To: apmail-incubator-cxf-commits-archive@incubator.apache.org Received: (qmail 17040 invoked by uid 500); 31 Jan 2007 13:48:17 -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 16933 invoked by uid 99); 31 Jan 2007 13:48:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jan 2007 05:48:17 -0800 X-ASF-Spam-Status: No, hits=-9.4 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, 31 Jan 2007 05:48:07 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 07B811A981A; Wed, 31 Jan 2007 05:47:48 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r501842 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/ws/policy/ rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/ systests/src/test/java/org/apache/cxf/systest/ws/rm/ Date: Wed, 31 Jan 2007 13:47:47 -0000 To: cxf-commits@incubator.apache.org From: andreasmyth@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070131134748.07B811A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: andreasmyth Date: Wed Jan 31 05:47:46 2007 New Revision: 501842 URL: http://svn.apache.org/viewvc?view=rev&rev=501842 Log: Interceptors configured for application endpoint also to be used for RM endpoint. Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java - copied unchanged from r501780, incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java incubator/cxf/trunk/api/src/main/java/org/apache/cxf/ws/policy/PolicyException.java - copied unchanged from r501780, incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyException.java incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml (with props) Removed: incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/AssertionBuilderRegistry.java incubator/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyException.java Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Modified: incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?view=diff&rev=501842&r1=501841&r2=501842 ============================================================================== --- incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java (original) +++ incubator/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java Wed Jan 31 05:47:46 2007 @@ -30,6 +30,7 @@ import org.apache.cxf.databinding.DataBinding; import org.apache.cxf.endpoint.Endpoint; import org.apache.cxf.endpoint.EndpointException; +import org.apache.cxf.endpoint.EndpointImpl; import org.apache.cxf.jaxb.JAXBDataBinding; import org.apache.cxf.jaxws.support.JaxWsEndpointImpl; import org.apache.cxf.service.Service; @@ -230,8 +231,18 @@ // What we really should do here is on use the same interceptors on the outbound // path that would be used by the application endpoint without presuming any knowledge // of the applications endpoint's frontend. - endpoint = new JaxWsEndpointImpl(manager.getBus(), service, ei); - // endpoint = new JaxWsEndpointImpl(manager.getBus(), service, ei); + EndpointImpl e = new JaxWsEndpointImpl(manager.getBus(), service, ei); + + + // use same endpoint specific interceptor as for the application endpoint + e.setOutInterceptors(applicationEndpoint.getOutInterceptors()); + e.setOutFaultInterceptors(applicationEndpoint.getOutFaultInterceptors()); + e.setInInterceptors(applicationEndpoint.getInInterceptors()); + e.setInFaultInterceptors(applicationEndpoint.getInFaultInterceptors()); + + endpoint = e; + + } catch (EndpointException ex) { throw new RuntimeException(ex); } Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=501842&r1=501841&r2=501842 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java (original) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Wed Jan 31 05:47:46 2007 @@ -69,6 +69,7 @@ private boolean doTestOnewayAnonymousAcksSequenceLength1 = testAll; private boolean doTestOnewayAnonymousAcksSupressed = testAll; private boolean doTestTwowayNonAnonymous = testAll; + private boolean doTestTwowayNonAnonymousEndpointSpecific = testAll; private boolean doTestTwowayNonAnonymousDeferred = testAll; private boolean doTestTwowayNonAnonymousMaximumSequenceLength2 = testAll; private boolean doTestOnewayMessageLoss = testAll; @@ -366,6 +367,56 @@ return; } setupGreeter("org/apache/cxf/systest/ws/rm/twoway.xml"); + + greeter.greetMe("one"); + greeter.greetMe("two"); + greeter.greetMe("three"); + + // CreateSequence and three greetMe messages + // TODO there should be partial responses to the decoupled responses! + + awaitMessages(4, 8); + + MessageFlow mf = new MessageFlow(outRecorder.getOutboundMessages(), inRecorder.getInboundMessages()); + + + mf.verifyMessages(4, true); + String[] expectedActions = new String[] {RMConstants.getCreateSequenceAction(), + GREETME_ACTION, + GREETME_ACTION, + GREETME_ACTION}; + mf.verifyActions(expectedActions, true); + mf.verifyMessageNumbers(new String[] {null, "1", "2", "3"}, true); + mf.verifyLastMessage(new boolean[] {false, false, false, false}, true); + mf.verifyAcknowledgements(new boolean[] {false, false, true, true}, true); + + // createSequenceResponse plus 3 greetMeResponse messages plus + // one partial response for each of the four messages + // the first partial response should no include an acknowledgement, the other three should + + mf.verifyMessages(8, false); + mf.verifyPartialResponses(4, new boolean[4]); + + mf.purgePartialResponses(); + + expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(), + GREETME_RESPONSE_ACTION, + GREETME_RESPONSE_ACTION, + GREETME_RESPONSE_ACTION}; + mf.verifyActions(expectedActions, false); + mf.verifyMessageNumbers(new String[] {null, "1", "2", "3"}, false); + mf.verifyLastMessage(new boolean[4], false); + mf.verifyAcknowledgements(new boolean[] {false, true, true, true}, false); + } + + // the same as above but using endpoint specific interceptor configuration + + public void testTwowayNonAnonymousEndpointSpecific() throws Exception { + if (!doTestTwowayNonAnonymousEndpointSpecific) { + return; + } + setupGreeter("org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml"); + greeter.greetMe("one"); greeter.greetMe("two"); Added: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml?view=auto&rev=501842 ============================================================================== --- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml (added) +++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml Wed Jan 31 05:47:46 2007 @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml