Fixing backport

Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3589f95c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3589f95c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3589f95c

Branch: refs/heads/2.7.x-fixes
Commit: 3589f95c27df9b8d900cede5907876145e57b4fe
Parents: 5bdf727
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Fri Jan 23 17:14:14 2015 +0000
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Fri Jan 23 17:14:14 2015 +0000

----------------------------------------------------------------------
 .../ws/common/KeystorePasswordCallback.java     | 73 --------------------
 .../fault/AbstractModifyRequestInterceptor.java |  3 +-
 .../systest/ws/fault/ModifiedRequestServer.java | 47 -------------
 .../systest/ws/fault/ModifiedRequestTest.java   | 48 +++++++------
 .../ws/fault/server/ModifiedRequestServer.java  | 47 +++++++++++++
 .../cxf/systest/ws/fault/DoubleItFault.wsdl     |  8 ---
 .../cxf/systest/ws/fault/client-untrusted.xml   | 37 ----------
 .../org/apache/cxf/systest/ws/fault/client.xml  | 51 --------------
 .../ws/fault/client/client-untrusted.xml        | 39 +++++++++++
 .../cxf/systest/ws/fault/client/client.xml      | 12 ++++
 .../cxf/systest/ws/fault/modified-server.xml    | 38 ----------
 .../systest/ws/fault/server/modified-server.xml | 50 ++++++++++++++
 12 files changed, 174 insertions(+), 279 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
deleted file mode 100644
index 511155a..0000000
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.systest.ws.common;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-import org.apache.wss4j.common.ext.WSPasswordCallback;
-
-/**
- * A CallbackHandler implementation for keystores.
- */
-public class KeystorePasswordCallback implements CallbackHandler {
-    
-    private Map<String, String> passwords = 
-        new HashMap<String, String>();
-    
-    public KeystorePasswordCallback() {
-        passwords.put("Alice", "abcd!1234");
-        passwords.put("alice", "password");
-        passwords.put("Bob", "abcd!1234");
-        passwords.put("bob", "password");
-        passwords.put("abcd", "dcba");
-        passwords.put("6e0e88f36ebb8744d470f62f604d03ea4ebe5094", "password");
-        passwords.put("wss40rev", "security");
-        passwords.put("morpit", "password");
-    }
-
-    /**
-     * It attempts to get the password from the private 
-     * alias/passwords map.
-     */
-    public void handle(Callback[] callbacks) throws IOException, 
UnsupportedCallbackException {
-        for (int i = 0; i < callbacks.length; i++) {
-            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
-            if (pc.getUsage() == 
WSPasswordCallback.PASSWORD_ENCRYPTOR_PASSWORD) {
-                pc.setPassword("this-is-a-secret");
-            } else {
-                String pass = passwords.get(pc.getIdentifier());
-                if (pass != null) {
-                    pc.setPassword(pass);
-                    return;
-                } else {
-                    pc.setPassword("password");
-                }
-            }
-        }
-    }
-    
-
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/AbstractModifyRequestInterceptor.java
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/AbstractModifyRequestInterceptor.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/AbstractModifyRequestInterceptor.java
index 53432e9..bb113ec 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/AbstractModifyRequestInterceptor.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/AbstractModifyRequestInterceptor.java
@@ -31,7 +31,6 @@ import javax.xml.soap.SOAPHeaderElement;
 import javax.xml.soap.SOAPMessage;
 
 import org.w3c.dom.Element;
-
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.saaj.SAAJUtils;
 import org.apache.cxf.interceptor.Fault;
@@ -39,7 +38,7 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.phase.PhaseInterceptor;
 import org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor;
-import org.apache.wss4j.dom.WSConstants;
+import org.apache.ws.security.WSConstants;
 
 public abstract class AbstractModifyRequestInterceptor implements 
PhaseInterceptor<SoapMessage> {
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestServer.java
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestServer.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestServer.java
deleted file mode 100644
index ab2009b..0000000
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestServer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.cxf.systest.ws.fault;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class ModifiedRequestServer extends AbstractBusTestServerBase {
-
-    public ModifiedRequestServer() {
-
-    }
-
-    protected void run()  {
-        URL busFile = 
ModifiedRequestServer.class.getResource("modified-server.xml");
-        Bus busLocal = new SpringBusFactory().createBus(busFile);
-        BusFactory.setDefaultBus(busLocal);
-        setBus(busLocal);
-
-        try {
-            new ModifiedRequestServer();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index 9523c47..a0c898c 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -24,6 +24,8 @@ import java.text.DateFormat;
 import java.util.Date;
 import java.util.Iterator;
 
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
 import javax.xml.datatype.Duration;
 import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.namespace.QName;
@@ -33,18 +35,16 @@ import javax.xml.ws.soap.SOAPFaultException;
 
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-
 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.systest.ws.common.SecurityTestUtil;
+import org.apache.cxf.systest.ws.fault.server.ModifiedRequestServer;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSSConfig;
-import org.apache.wss4j.dom.util.WSSecurityUtil;
-import org.apache.wss4j.dom.util.XmlSchemaDateFormat;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.ws.security.util.XmlSchemaDateFormat;
 import org.example.contract.doubleit.DoubleItFault;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
@@ -78,7 +78,7 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     public void testModifiedSignedTimestamp() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = ModifiedRequestTest.class.getResource("client.xml");
+        URL busFile = 
ModifiedRequestTest.class.getResource("client/client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
@@ -106,7 +106,7 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     public void testModifiedSignature() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = ModifiedRequestTest.class.getResource("client.xml");
+        URL busFile = 
ModifiedRequestTest.class.getResource("client/client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
@@ -134,7 +134,7 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     public void testUntrustedSignature() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = 
ModifiedRequestTest.class.getResource("client-untrusted.xml");
+        URL busFile = 
ModifiedRequestTest.class.getResource("client/client-untrusted.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
@@ -157,7 +157,7 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     public void testModifiedEncryptedKey() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = ModifiedRequestTest.class.getResource("client.xml");
+        URL busFile = 
ModifiedRequestTest.class.getResource("client/client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
@@ -185,7 +185,7 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     public void testModifiedEncryptedSOAPBody() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = ModifiedRequestTest.class.getResource("client.xml");
+        URL busFile = 
ModifiedRequestTest.class.getResource("client/client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);
@@ -220,14 +220,13 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
             Iterator<?> subcodeIterator = fault.getFaultSubcodes();
             assertTrue(subcodeIterator.hasNext());
             Object subcode = subcodeIterator.next();
-            assertEquals(WSSecurityException.FAILED_CHECK, subcode);
+            assertEquals(WSConstants.FAILED_CHECK, subcode);
             assertFalse(subcodeIterator.hasNext());
         }
     }
     
     private static class ModifiedTimestampInterceptor extends 
AbstractModifyRequestInterceptor {
 
-        @Override
         public void modifySecurityHeader(Element securityHeader) {
             if (securityHeader != null) {
                 // Find the Timestamp + change it.
@@ -238,13 +237,19 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
                     WSSecurityUtil.findElement(timestampElement, "Created", 
WSConstants.WSU_NS);
                 DateFormat zulu = new XmlSchemaDateFormat();
                 
-                XMLGregorianCalendar createdCalendar = 
-                    
WSSConfig.datatypeFactory.newXMLGregorianCalendar(createdValue.getTextContent());
-                // Add 5 seconds
-                Duration duration = 
WSSConfig.datatypeFactory.newDuration(5000L);
-                createdCalendar.add(duration);
-                Date createdDate = 
createdCalendar.toGregorianCalendar().getTime();
-                createdValue.setTextContent(zulu.format(createdDate));
+                DatatypeFactory datatypeFactory;
+                try {
+                    datatypeFactory = DatatypeFactory.newInstance();
+                    XMLGregorianCalendar createdCalendar = 
+                        
datatypeFactory.newXMLGregorianCalendar(createdValue.getTextContent());
+                    // Add 5 seconds
+                    Duration duration = datatypeFactory.newDuration(5000L);
+                    createdCalendar.add(duration);
+                    Date createdDate = 
createdCalendar.toGregorianCalendar().getTime();
+                    createdValue.setTextContent(zulu.format(createdDate));
+                } catch (DatatypeConfigurationException e) {
+                    // TODO Auto-generated catch block
+                }
             }
         }
         
@@ -255,7 +260,6 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     
     private static class ModifiedSignatureInterceptor extends 
AbstractModifyRequestInterceptor {
 
-        @Override
         public void modifySecurityHeader(Element securityHeader) {
             if (securityHeader != null) {
                 Element signatureElement = 
@@ -276,7 +280,6 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     
     private static class ModifiedEncryptedKeyInterceptor extends 
AbstractModifyRequestInterceptor {
 
-        @Override
         public void modifySecurityHeader(Element securityHeader) {
             if (securityHeader != null) {
                 Element encryptedKey = 
@@ -306,7 +309,6 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
     
     private static class ModifiedEncryptedSOAPBody extends 
AbstractModifyRequestInterceptor {
 
-        @Override
         public void modifySecurityHeader(Element securityHeader) {
            //
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/server/ModifiedRequestServer.java
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/server/ModifiedRequestServer.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/server/ModifiedRequestServer.java
new file mode 100644
index 0000000..e280317
--- /dev/null
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/server/ModifiedRequestServer.java
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.ws.fault.server;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class ModifiedRequestServer extends AbstractBusTestServerBase {
+
+    public ModifiedRequestServer() {
+
+    }
+
+    protected void run()  {
+        URL busFile = 
ModifiedRequestServer.class.getResource("modified-server.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new ModifiedRequestServer();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl
index 7d3ef5d..53e6f56 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl
@@ -92,9 +92,6 @@
             </wsdl:fault>
         </wsdl:operation>
     </wsdl:binding>
-<<<<<<< HEAD
-    
-=======
     <wsdl:binding name="DoubleItAsymmetricBinding" type="tns:DoubleItPortType">
         <wsp:PolicyReference URI="#DoubleItAsymmetricPolicy"/>
         <soap12:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
@@ -113,7 +110,6 @@
             </wsdl:fault>
         </wsdl:operation>
     </wsdl:binding>
->>>>>>> c748748... Adding some modified request testing for WS-Security
     <wsdl:service name="DoubleItService">
         <wsdl:port name="DoubleItSoap11Port" 
binding="tns:DoubleItSoap11Binding">
             <soap:address location="http://localhost:9009/DoubleItSoap11"; />
@@ -172,9 +168,6 @@
             </wsp:All>
         </wsp:ExactlyOne>
     </wsp:Policy>
-<<<<<<< HEAD
-    
-=======
     <wsp:Policy wsu:Id="DoubleItAsymmetricPolicy">
         <wsp:ExactlyOne>
             <wsp:All>
@@ -217,7 +210,6 @@
             </wsp:All>
         </wsp:ExactlyOne>
     </wsp:Policy>
->>>>>>> c748748... Adding some modified request testing for WS-Security
     <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
       <wsp:ExactlyOne>
          <wsp:All>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client-untrusted.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client-untrusted.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client-untrusted.xml
deleted file mode 100644
index 9ed4ae4..0000000
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client-untrusted.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:cxf="http://cxf.apache.org/core"; xmlns:p="http://cxf.apache.org/policy"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; xsi:schemaLocation="   
        http://www.springframework.org/schema/beans           
http://www.springframework.org/schema/beans/spring-beans.xsd           
http://cxf.apache.org/jaxws                           
http://cxf.apache.org/schemas/jaxws.xsd           
http://cxf.apache.org/transports/http/configuration   
http://cxf.apache.org/schemas/configuration/http-conf.xsd           
http://cxf.apache.org/configuration/security          
http://cxf.apache.org/schemas/configuration/security.xsd           
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd           
http://cxf.apache.org/policy http://cxf.apache.org/schemas/poli
 cy.xsd">
-    <cxf:bus>
-        <cxf:features>
-            <p:policies/>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    
-    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricPort"; 
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.encryption.properties" 
value="bob-enc.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" 
value="morpit.properties"/>
-            <entry key="ws-security.signature.username" value="morpit"/>
-            <entry key="ws-security.callback-handler" 
value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
-        </jaxws:properties>
-    </jaxws:client>
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
deleted file mode 100644
index 8011c39..0000000
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:cxf="http://cxf.apache.org/core"; xmlns:p="http://cxf.apache.org/policy"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; xsi:schemaLocation="   
        http://www.springframework.org/schema/beans           
http://www.springframework.org/schema/beans/spring-beans.xsd           
http://cxf.apache.org/jaxws                           
http://cxf.apache.org/schemas/jaxws.xsd           
http://cxf.apache.org/transports/http/configuration   
http://cxf.apache.org/schemas/configuration/http-conf.xsd           
http://cxf.apache.org/configuration/security          
http://cxf.apache.org/schemas/configuration/security.xsd           
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd           
http://cxf.apache.org/policy http://cxf.apache.org/schemas/poli
 cy.xsd">
-    <cxf:bus>
-        <cxf:features>
-            <p:policies/>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItSoap11Port"; 
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.callback-handler" 
value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
-            <entry key="ws-security.encryption.properties" 
value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-        </jaxws:properties>
-    </jaxws:client>
-    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItSoap12Port"; 
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.callback-handler" 
value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
-            <entry key="ws-security.encryption.properties" 
value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-        </jaxws:properties>
-    </jaxws:client>
-    
-    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricPort"; 
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.encryption.properties" 
value="bob-enc.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" 
value="alice-enc.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.callback-handler" 
value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
-        </jaxws:properties>
-    </jaxws:client>
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client-untrusted.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client-untrusted.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client-untrusted.xml
new file mode 100644
index 0000000..20f3199
--- /dev/null
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client-untrusted.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:cxf="http://cxf.apache.org/core"; xmlns:p="http://cxf.apache.org/policy"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; xsi:schemaLocation="   
        http://www.springframework.org/schema/beans           
http://www.springframework.org/schema/beans/spring-beans.xsd           
http://cxf.apache.org/jaxws                           
http://cxf.apache.org/schemas/jaxws.xsd           
http://cxf.apache.org/transports/http/configuration   
http://cxf.apache.org/schemas/configuration/http-conf.xsd           
http://cxf.apache.org/configuration/security          
http://cxf.apache.org/schemas/configuration/security.xsd           
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd           
http://cxf.apache.org/policy http://cxf.apache.org/schemas/poli
 cy.xsd">
+    <cxf:bus>
+        <cxf:features>
+            <p:policies/>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricPort"; 
createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="ws-security.encryption.properties"
+                   
value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+            <entry key="ws-security.encryption.username" value="bob"/>
+            <entry key="ws-security.signature.properties" 
value="morpit.properties"/>
+            <entry key="ws-security.signature.username" value="morpit"/>
+            <entry key="ws-security.callback-handler" 
+                   
value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+        </jaxws:properties>
+    </jaxws:client>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client.xml
index d637dbe..14ea029 100644
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client.xml
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/client/client.xml
@@ -61,5 +61,17 @@
        </jaxws:properties>
     </jaxws:client>
     
+    <jaxws:client 
name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricPort"; 
createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.encryption.properties"
+                  
value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/> 
+           <entry key="ws-security.encryption.username" value="bob"/>
+           <entry key="ws-security.signature.properties" 
+                  
value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/> 
+           <entry key="ws-security.signature.username" value="alice"/>
+           <entry key="ws-security.callback-handler" 
+                  
value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+       </jaxws:properties>
+    </jaxws:client>
     
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/modified-server.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/modified-server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/modified-server.xml
deleted file mode 100644
index 84390e7..0000000
--- 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/modified-server.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
- 
- http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; 
xmlns:cxf="http://cxf.apache.org/core"; xmlns:p="http://cxf.apache.org/policy"; 
xsi:schemaLocation="         http://www.springframework.org/schema/beans        
             http://www.springframework.org/schema/beans/spring-beans.xsd       
  http://cxf.apache.org/jaxws                                     
http://cxf.apache.org/schemas/jaxws.xsd         http://cxf.apache.org/core 
http://cxf.apache.org/schemas/core.xsd         http://cxf.apache.org/policy 
http://cxf.apache.org/schemas/policy.xsd         
http://cxf.apache.org/transports/http/configuration             
http://cxf.apache.org/schemas/configuration/http-conf.xsd         http://cxf.apa
 che.org/transports/http-jetty/configuration       
http://cxf.apache.org/schemas/configuration/http-jetty.xsd         
http://cxf.apache.org/configuration/security                    
http://cxf.apache.org/schemas/configuration/security.xsd     ">
-    <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
-    <cxf:bus>
-        <cxf:features>
-            <p:policies/>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt"; 
id="Asymmetric" 
address="http://localhost:${testutil.ports.ModifiedRequestServer}/DoubleItAsymmetric";
 serviceName="s:DoubleItService" endpointName="s:DoubleItAsymmetricPort" 
implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" 
wsdlLocation="org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl">
-        <jaxws:properties>
-            <entry key="ws-security.callback-handler" 
value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
-            <entry key="ws-security.signature.properties" 
value="bob.properties"/>
-            <entry key="ws-security.encryption.properties" 
value="alice.properties"/>
-            <entry key="ws-security.encryption.username" value="alice"/>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3589f95c/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server/modified-server.xml
----------------------------------------------------------------------
diff --git 
a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server/modified-server.xml
 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server/modified-server.xml
new file mode 100644
index 0000000..8f96a83
--- /dev/null
+++ 
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/fault/server/modified-server.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ 
+ http://www.apache.org/licenses/LICENSE-2.0
+ 
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:jaxws="http://cxf.apache.org/jaxws"; 
xmlns:http="http://cxf.apache.org/transports/http/configuration"; 
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"; 
xmlns:sec="http://cxf.apache.org/configuration/security"; 
xmlns:cxf="http://cxf.apache.org/core"; xmlns:p="http://cxf.apache.org/policy"; 
xsi:schemaLocation="         http://www.springframework.org/schema/beans        
             http://www.springframework.org/schema/beans/spring-beans.xsd       
  http://cxf.apache.org/jaxws                                     
http://cxf.apache.org/schemas/jaxws.xsd         http://cxf.apache.org/core 
http://cxf.apache.org/schemas/core.xsd         http://cxf.apache.org/policy 
http://cxf.apache.org/schemas/policy.xsd         
http://cxf.apache.org/transports/http/configuration             
http://cxf.apache.org/schemas/configuration/http-conf.xsd         http://cxf.apa
 che.org/transports/http-jetty/configuration       
http://cxf.apache.org/schemas/configuration/http-jetty.xsd         
http://cxf.apache.org/configuration/security                    
http://cxf.apache.org/schemas/configuration/security.xsd     ">
+    <bean 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    <cxf:bus>
+        <cxf:features>
+            <p:policies/>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <jaxws:endpoint 
+       id="Asymmetric"
+       
address="http://localhost:${testutil.ports.ModifiedRequestServer}/DoubleItAsymmetric";
 
+       serviceName="s:DoubleItService"
+       endpointName="s:DoubleItAsymmetricPort"
+       xmlns:s="http://www.example.org/contract/DoubleIt";
+       implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
+       wsdlLocation="org/apache/cxf/systest/ws/fault/DoubleItFault.wsdl">
+        
+       <jaxws:properties>
+          <entry key="ws-security.callback-handler" 
+                  
value="org.apache.cxf.systest.ws.wssec10.client.KeystorePasswordCallback"/>
+          <entry key="ws-security.signature.properties" 
+                  
value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/> 
+          <entry key="ws-security.encryption.properties" 
+                  
value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/> 
+          <entry key="ws-security.encryption.username" value="alice"/>
+       </jaxws:properties> 
+     
+    </jaxws:endpoint> 
+    
+</beans>

Reply via email to