Author: coheigea Date: Fri Dec 21 16:08:32 2012 New Revision: 1424990 URL: http://svn.apache.org/viewvc?rev=1424990&view=rev Log: Merged revisions 1424986 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1424986 | coheigea | 2012-12-21 16:03:17 +0000 (Fri, 21 Dec 2012) | 10 lines Merged revisions 1424983 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1424983 | coheigea | 2012-12-21 15:53:39 +0000 (Fri, 21 Dec 2012) | 2 lines [CXF-4716] - Updated test to reproduce the issue properly ........ ........ Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java?rev=1424990&r1=1424989&r2=1424990&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java (original) +++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java Fri Dec 21 16:08:32 2012 @@ -20,6 +20,8 @@ package org.apache.cxf.systest.ws.x509; import java.net.URL; +import java.util.ArrayList; +import java.util.List; import javax.xml.namespace.QName; import javax.xml.ws.BindingProvider; @@ -29,6 +31,8 @@ import org.apache.cxf.Bus; import org.apache.cxf.bus.spring.SpringBusFactory; import org.apache.cxf.endpoint.Client; import org.apache.cxf.frontend.ClientProxy; +import org.apache.cxf.headers.Header; +import org.apache.cxf.jaxb.JAXBDataBinding; import org.apache.cxf.systest.ws.common.SecurityTestUtil; import org.apache.cxf.systest.ws.ut.SecurityHeaderCacheInterceptor; import org.apache.cxf.systest.ws.x509.server.Server; @@ -551,6 +555,12 @@ public class X509TokenTest extends Abstr service.getPort(portQName, DoubleItPortType2.class); updateAddressPort(x509Port, PORT); + List<Header> headers = new ArrayList<Header>(); + Header dummyHeader = new Header(new QName("uri:org.apache.cxf", "dummy"), "dummy-header", + new JAXBDataBinding(String.class)); + headers.add(dummyHeader); + ((BindingProvider)x509Port).getRequestContext().put(Header.HEADER_LIST, headers); + int response = x509Port.doubleIt(25); assertEquals(50, response); Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl?rev=1424990&r1=1424989&r2=1424990&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl (original) +++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl Fri Dec 21 16:08:32 2012 @@ -56,7 +56,7 @@ </wsdl:input> <wsdl:output> <soap:body use="literal" /> - <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy2"/> + <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/> </wsdl:output> </wsdl:operation> </wsdl:binding> @@ -113,9 +113,10 @@ <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy2"> <wsp:ExactlyOne> <wsp:All> - <sp:SignedParts> + <sp:EncryptedParts> <sp:Body/> - </sp:SignedParts> + <sp:Header Namespace="uri:org.apache.cxf" /> + </sp:EncryptedParts> </wsp:All> </wsp:ExactlyOne> </wsp:Policy> @@ -128,14 +129,5 @@ </wsp:All> </wsp:ExactlyOne> </wsp:Policy> - <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Output_Policy2"> - <wsp:ExactlyOne> - <wsp:All> - <sp:SignedParts> - <sp:Body/> - </sp:SignedParts> - </wsp:All> - </wsp:ExactlyOne> - </wsp:Policy> </wsdl:definitions>
