cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1424983 - in /cxf/trunk/systests/ws-security/src/test: java/org/apache/cxf/systest/ws/x509/X509TokenTest.java resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl
Date Fri, 21 Dec 2012 15:53:39 GMT
Author: coheigea
Date: Fri Dec 21 15:53:39 2012
New Revision: 1424983

URL: http://svn.apache.org/viewvc?rev=1424983&view=rev
Log:
[CXF-4716] - Updated test to reproduce the issue properly

Modified:
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
    cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java?rev=1424983&r1=1424982&r2=1424983&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
Fri Dec 21 15:53:39 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.Intermediary;
@@ -609,6 +613,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/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl?rev=1424983&r1=1424982&r2=1424983&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl
(original)
+++ cxf/trunk/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/x509/DoubleItOperations.wsdl
Fri Dec 21 15:53:39 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>



Mime
View raw message