cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1477174 - in /cxf/branches/2.5.x-fixes/systests/ws-security/src/test: java/org/apache/cxf/systest/ws/coverage_checker/ resources/org/apache/cxf/systest/ws/coverage_checker/ resources/org/apache/cxf/systest/ws/coverage_checker/client/ resou...
Date Mon, 29 Apr 2013 16:22:31 GMT
Author: coheigea
Date: Mon Apr 29 16:22:25 2013
New Revision: 1477174

URL: http://svn.apache.org/r1477174
Log:
Merged revisions 1477168 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1477168 | coheigea | 2013-04-29 17:05:59 +0100 (Mon, 29 Apr 2013) | 18 lines

  Merged revisions 1477159 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

  ........
    r1477159 | coheigea | 2013-04-29 16:42:15 +0100 (Mon, 29 Apr 2013) | 10 lines

    Merged revisions 1477152 via  git cherry-pick from
    https://svn.apache.org/repos/asf/cxf/trunk

    ........
      r1477152 | coheigea | 2013-04-29 16:31:36 +0100 (Mon, 29 Apr 2013) | 2 lines

      Adding some tests for a secured SOAP Fault

    ........

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/DefaultCryptoCoverageCheckerTest.java
    cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl
    cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/client/client.xml
    cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/server/server.xml

Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/DefaultCryptoCoverageCheckerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/DefaultCryptoCoverageCheckerTest.java?rev=1477174&r1=1477173&r2=1477174&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/DefaultCryptoCoverageCheckerTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/DefaultCryptoCoverageCheckerTest.java
Mon Apr 29 16:22:25 2013
@@ -462,4 +462,37 @@ public class DefaultCryptoCoverageChecke
         ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
+    
+    // Here the service is sending an secured message back to the client. For a server Fault

+    // message it should return a secured Fault message as well
+    @org.junit.Test
+    public void testClientChecker2() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = DefaultCryptoCoverageCheckerTest.class.getResource("client/client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+        
+        URL wsdl = DefaultCryptoCoverageCheckerTest.class.getResource("DoubleItCoverageChecker.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItClientCheckerPort2");
+        DoubleItPortType port = 
+                service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(port, PORT);
+        
+        port.doubleIt(25);
+        
+        // Now try with a message that will create a Fault in the SEI
+        try {
+            port.doubleIt(0);
+            fail("Failure expected on trying to double 0");
+        } catch (Exception ex) {
+            assertTrue(ex.getMessage().contains("0 can't be doubled"));
+        }
+        
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
+    
 }

Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl?rev=1477174&r1=1477173&r2=1477174&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl
Mon Apr 29 16:22:25 2013
@@ -80,6 +80,9 @@
         <wsdl:port name="DoubleItClientCheckerPort" binding="tns:DoubleItSoapBinding">
             <soap:address location="http://localhost:9001/DoubleItClientChecker" />
         </wsdl:port>
+        <wsdl:port name="DoubleItClientCheckerPort2" binding="tns:DoubleItSoapBinding">
+            <soap:address location="http://localhost:9001/DoubleItClientChecker2" />
+        </wsdl:port>
     </wsdl:service>
     
 </wsdl:definitions>

Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/client/client.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/client/client.xml?rev=1477174&r1=1477173&r2=1477174&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/client/client.xml
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/client/client.xml
Mon Apr 29 16:22:25 2013
@@ -77,4 +77,33 @@
        </jaxws:inInterceptors>
     </jaxws:client>
     
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItClientCheckerPort2"

+                  createdFromAPI="true">
+        <jaxws:inInterceptors>
+        <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+           <constructor-arg>
+            <map>
+               <entry key="action" value="Signature"/>
+               <entry key="signaturePropFile" value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>
+               <entry key="passwordCallbackClass" 
+                  value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+            </map>
+           </constructor-arg>
+        </bean>
+        <bean class="org.apache.cxf.ws.security.wss4j.DefaultCryptoCoverageChecker" />
+       </jaxws:inInterceptors>
+       <jaxws:inFaultInterceptors>
+        <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+           <constructor-arg>
+            <map>
+               <entry key="action" value="Signature"/>
+               <entry key="signaturePropFile" value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>
+               <entry key="passwordCallbackClass" 
+                  value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+            </map>
+           </constructor-arg>
+        </bean>
+       </jaxws:inFaultInterceptors>
+    </jaxws:client>
+    
 </beans>

Modified: cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/server/server.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/server/server.xml?rev=1477174&r1=1477173&r2=1477174&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/server/server.xml
(original)
+++ cxf/branches/2.5.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/coverage_checker/server/server.xml
Mon Apr 29 16:22:25 2013
@@ -172,5 +172,41 @@
         </bean>
        </jaxws:outInterceptors>
     </jaxws:endpoint> 
+     
+    <jaxws:endpoint 
+       id="ClientChecker2"
+       address="http://localhost:${testutil.ports.Server}/DoubleItClientChecker2" 
+       serviceName="s:DoubleItService"
+       endpointName="s:DoubleItClientCheckerPort2"
+       xmlns:s="http://www.example.org/contract/DoubleIt"
+       implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+       wsdlLocation="org/apache/cxf/systest/ws/coverage_checker/DoubleItCoverageChecker.wsdl">
+       <jaxws:outInterceptors>
+         <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+           <constructor-arg>
+            <map>
+               <entry key="action" value="Signature"/>
+               <entry key="signaturePropFile" value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>
+               <entry key="passwordCallbackClass" 
+                  value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+               <entry key="user" value="alice"/>
+            </map>
+           </constructor-arg>
+        </bean>
+       </jaxws:outInterceptors>
+       <jaxws:outFaultInterceptors>
+         <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+           <constructor-arg>
+            <map>
+               <entry key="action" value="Signature"/>
+               <entry key="signaturePropFile" value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>
+               <entry key="passwordCallbackClass" 
+                  value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+               <entry key="user" value="alice"/>
+            </map>
+           </constructor-arg>
+        </bean>
+       </jaxws:outFaultInterceptors>
+    </jaxws:endpoint> 
    
 </beans>



Mime
View raw message