cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [3/3] git commit: Fixing build from last commit
Date Mon, 12 May 2014 12:04:18 GMT
Fixing build from last commit


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

Branch: refs/heads/2.7.x-fixes
Commit: ad1c0971c7752a51b38d3e190c0508c4ee89e60a
Parents: 8c87c55
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon May 12 13:04:02 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon May 12 13:04:02 2014 +0100

----------------------------------------------------------------------
 .../wss4j/BinarySecurityTokenInterceptor.java   |  29 +--
 .../wss4j/KerberosTokenInterceptor.java         | 127 +------------
 .../apache/cxf/systest/ws/tokens/BSTServer.java |  47 -----
 .../ws/tokens/BinarySecurityTokenTest.java      |   6 +-
 .../cxf/systest/ws/tokens/DoubleItBSTImpl.java  |   8 +-
 .../cxf/systest/ws/tokens/server/BSTServer.java |  47 +++++
 .../cxf/systest/ws/tokens/DoubleItTokens.wsdl   |   6 +-
 .../apache/cxf/systest/ws/tokens/bst-server.xml |  36 ----
 .../org/apache/cxf/systest/ws/tokens/client.xml | 177 -------------------
 .../cxf/systest/ws/tokens/client/client.xml     |   6 +
 .../cxf/systest/ws/tokens/server/bst-server.xml |  36 ++++
 11 files changed, 115 insertions(+), 410 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
index 052fc16..c10c252 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/BinarySecurityTokenInterceptor.java
@@ -37,19 +37,19 @@ import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.security.DefaultSecurityContext;
 import org.apache.cxf.security.SecurityContext;
 import org.apache.cxf.ws.security.SecurityConstants;
+import org.apache.cxf.ws.security.policy.model.Token;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
 import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.dom.WSConstants;
-import org.apache.wss4j.dom.WSDocInfo;
-import org.apache.wss4j.dom.WSSConfig;
-import org.apache.wss4j.dom.WSSecurityEngineResult;
-import org.apache.wss4j.dom.handler.RequestData;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
-import org.apache.wss4j.dom.handler.WSHandlerResult;
-import org.apache.wss4j.dom.processor.BinarySecurityTokenProcessor;
-import org.apache.wss4j.dom.validate.Validator;
-import org.apache.wss4j.policy.model.AbstractToken;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSDocInfo;
+import org.apache.ws.security.WSSConfig;
+import org.apache.ws.security.WSSecurityEngineResult;
+import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.handler.RequestData;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.handler.WSHandlerResult;
+import org.apache.ws.security.processor.BinarySecurityTokenProcessor;
+import org.apache.ws.security.validate.Validator;
 
 /**
  * An interceptor to add a BinarySecurityToken token to the security header of an outbound
request, and to
@@ -126,9 +126,10 @@ public class BinarySecurityTokenInterceptor extends AbstractTokenInterceptor
{
                     }
                 } catch (RuntimeException t) {
                     throw t;
-                } catch (Exception ex) {
-                    throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE,
ex);
+                }  catch (Throwable t) {
+                    throw new WSSecurityException(t.getMessage(), t);
                 }
+
                 return super.getValidator(qName);
             }
         };
@@ -140,7 +141,7 @@ public class BinarySecurityTokenInterceptor extends AbstractTokenInterceptor
{
         return results;
     }
     
-    protected AbstractToken assertTokens(SoapMessage message) {
+    protected Token assertTokens(SoapMessage message) {
         // Assert tokens here if required
         return null;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/KerberosTokenInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/KerberosTokenInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/KerberosTokenInterceptor.java
index 19efb19..aa735f7 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/KerberosTokenInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/KerberosTokenInterceptor.java
@@ -20,34 +20,8 @@
 package org.apache.cxf.ws.security.wss4j;
 
 import org.apache.cxf.binding.soap.SoapMessage;
-<<<<<<< HEAD
-import org.apache.cxf.common.classloader.ClassLoaderUtils;
-import org.apache.cxf.headers.Header;
-import org.apache.cxf.helpers.CastUtils;
-import org.apache.cxf.helpers.DOMUtils;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.interceptor.security.DefaultSecurityContext;
-import org.apache.cxf.security.SecurityContext;
-import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.policy.SP12Constants;
 import org.apache.cxf.ws.security.policy.model.Token;
-import org.apache.cxf.ws.security.tokenstore.SecurityToken;
-import org.apache.cxf.ws.security.tokenstore.TokenStore;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.WSDocInfo;
-import org.apache.ws.security.WSSConfig;
-import org.apache.ws.security.WSSecurityEngineResult;
-import org.apache.ws.security.WSSecurityException;
-import org.apache.ws.security.handler.RequestData;
-import org.apache.ws.security.handler.WSHandlerConstants;
-import org.apache.ws.security.handler.WSHandlerResult;
-import org.apache.ws.security.processor.BinarySecurityTokenProcessor;
-import org.apache.ws.security.validate.Validator;
-=======
-import org.apache.cxf.ws.policy.AssertionInfoMap;
-import org.apache.wss4j.policy.SPConstants;
-import org.apache.wss4j.policy.model.AbstractToken;
->>>>>>> 2120019... Adding a test-case for adding + parsing a BinarySecurityToken
 
 /**
  * An interceptor to add a Kerberos token to the security header of an outbound request,
and to
@@ -61,107 +35,8 @@ public class KerberosTokenInterceptor extends BinarySecurityTokenInterceptor
{
         super();
     }
     
-<<<<<<< HEAD
-    protected void processToken(SoapMessage message) {
-        Header h = findSecurityHeader(message, false);
-        if (h == null) {
-            return;
-        }
-        Element el = (Element)h.getObject();
-        Element child = DOMUtils.getFirstElement(el);
-        while (child != null) {
-            if (WSConstants.BINARY_TOKEN_LN.equals(child.getLocalName())
-                && WSConstants.WSSE_NS.equals(child.getNamespaceURI())) {
-                try {
-                    List<WSSecurityEngineResult> bstResults = processToken(child, message);
-                    if (bstResults != null) {
-                        List<WSHandlerResult> results = CastUtils.cast((List<?>)message
-                                .get(WSHandlerConstants.RECV_RESULTS));
-                        if (results == null) {
-                            results = new ArrayList<WSHandlerResult>();
-                            message.put(WSHandlerConstants.RECV_RESULTS, results);
-                        }
-                        WSHandlerResult rResult = new WSHandlerResult(null, bstResults);
-                        results.add(0, rResult);
-
-                        assertTokens(message, SP12Constants.KERBEROS_TOKEN, false);
-                        
-                        Principal principal = 
-                            (Principal)bstResults.get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
-                        message.put(WSS4JInInterceptor.PRINCIPAL_RESULT, principal);    
              
-                        
-                        SecurityContext sc = message.get(SecurityContext.class);
-                        if (sc == null || sc.getUserPrincipal() == null) {
-                            message.put(SecurityContext.class, new DefaultSecurityContext(principal,
null));
-                        }
-
-                    }
-                } catch (WSSecurityException ex) {
-                    throw new Fault(ex);
-                }
-            }
-            child = DOMUtils.getNextElement(child);
-        }
-    }
-    
-    private List<WSSecurityEngineResult> processToken(Element tokenElement, final SoapMessage
message)
-        throws WSSecurityException {
-        WSDocInfo wsDocInfo = new WSDocInfo(tokenElement.getOwnerDocument());
-        RequestData data = new RequestData() {
-            public CallbackHandler getCallbackHandler() {
-                return getCallback(message);
-            }
-            public Validator getValidator(QName qName) throws WSSecurityException {
-                String key = SecurityConstants.BST_TOKEN_VALIDATOR;
-                Object o = message.getContextualProperty(key);
-                try {
-                    if (o instanceof Validator) {
-                        return (Validator)o;
-                    } else if (o instanceof Class) {
-                        return (Validator)((Class<?>)o).newInstance();
-                    } else if (o instanceof String) {
-                        return (Validator)ClassLoaderUtils.loadClass(o.toString(),
-                                                                     KerberosTokenInterceptor.class)
-                                                                     .newInstance();
-                    }
-                } catch (RuntimeException t) {
-                    throw t;
-                } catch (Throwable t) {
-                    throw new WSSecurityException(t.getMessage(), t);
-                }
-                return super.getValidator(qName);
-            }
-        };
-        data.setWssConfig(WSSConfig.getNewInstance());
-        
-        BinarySecurityTokenProcessor p = new BinarySecurityTokenProcessor();
-        List<WSSecurityEngineResult> results = 
-            p.handleToken(tokenElement, data, wsDocInfo);
-        return results;
-    }
-    
     protected Token assertTokens(SoapMessage message) {
-        return assertTokens(message, SP12Constants.KERBEROS_TOKEN, true);
-    }
-
-    protected void addToken(SoapMessage message) {
-        SecurityToken securityToken = getSecurityToken(message);
-        if (securityToken == null || securityToken.getToken() == null) {
-            // No SecurityToken so just return
-            return;
-        }
-        
-        assertTokens(message);
-        Header h = findSecurityHeader(message, true);
-        Element el = (Element)h.getObject();
-        el.appendChild(el.getOwnerDocument().importNode(securityToken.getToken(), true));
-=======
-    protected AbstractToken assertTokens(SoapMessage message) {
-        AssertionInfoMap aim = message.get(AssertionInfoMap.class);
-        assertPolicy(aim, "WssKerberosV5ApReqToken11");
-        assertPolicy(aim, "WssGssKerberosV5ApReqToken11");
-        return assertTokens(message, SPConstants.KERBEROS_TOKEN, false);
->>>>>>> 2120019... Adding a test-case for adding + parsing a BinarySecurityToken
+        return assertTokens(message, SP12Constants.KERBEROS_TOKEN, false);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BSTServer.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BSTServer.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BSTServer.java
deleted file mode 100644
index 166e59b..0000000
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BSTServer.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.tokens;
-
-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 BSTServer extends AbstractBusTestServerBase {
-
-    public BSTServer() {
-
-    }
-
-    protected void run()  {
-        URL busFile = BSTServer.class.getResource("bst-server.xml");
-        Bus busLocal = new SpringBusFactory().createBus(busFile);
-        BusFactory.setDefaultBus(busLocal);
-        setBus(busLocal);
-
-        try {
-            new BSTServer();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
index 640b317..1c894b9 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
@@ -27,14 +27,16 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Service;
 
 import org.w3c.dom.Document;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.systest.ws.common.SecurityTestUtil;
+import org.apache.cxf.systest.ws.tokens.server.BSTServer;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.tokenstore.SecurityToken;
-import org.apache.wss4j.dom.message.token.BinarySecurity;
+import org.apache.ws.security.message.token.BinarySecurity;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.BeforeClass;
 
@@ -68,7 +70,7 @@ public class BinarySecurityTokenTest extends AbstractBusClientServerTestBase
{
     public void testBinarySecurityToken() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = BinarySecurityTokenTest.class.getResource("client.xml");
+        URL busFile = BinarySecurityTokenTest.class.getResource("client/client.xml");
 
         Bus bus = bf.createBus(busFile.toString());
         SpringBusFactory.setDefaultBus(bus);

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/DoubleItBSTImpl.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/DoubleItBSTImpl.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/DoubleItBSTImpl.java
index 09fd847..01092a7 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/DoubleItBSTImpl.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/DoubleItBSTImpl.java
@@ -27,10 +27,10 @@ import javax.xml.ws.WebServiceContext;
 
 import org.apache.cxf.feature.Features;
 import org.apache.cxf.helpers.CastUtils;
-import org.apache.wss4j.dom.WSSecurityEngineResult;
-import org.apache.wss4j.dom.handler.WSHandlerConstants;
-import org.apache.wss4j.dom.handler.WSHandlerResult;
-import org.apache.wss4j.dom.message.token.BinarySecurity;
+import org.apache.ws.security.WSSecurityEngineResult;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.handler.WSHandlerResult;
+import org.apache.ws.security.message.token.BinarySecurity;
 import org.example.contract.doubleit.DoubleItFault;
 import org.example.contract.doubleit.DoubleItPortType;
 import org.junit.Assert;

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/server/BSTServer.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/server/BSTServer.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/server/BSTServer.java
new file mode 100644
index 0000000..091489d
--- /dev/null
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/server/BSTServer.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.tokens.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 BSTServer extends AbstractBusTestServerBase {
+
+    public BSTServer() {
+
+    }
+
+    protected void run()  {
+        URL busFile = BSTServer.class.getResource("bst-server.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new BSTServer();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl
index e32a23b..c60f926 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl
@@ -49,9 +49,7 @@
             </wsdl:fault>
         </wsdl:operation>
     </wsdl:binding>
-<<<<<<< HEAD
-    
-=======
+
     <wsdl:binding name="DoubleItNoSecurityBinding" type="tns:DoubleItPortType">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
         <wsdl:operation name="DoubleIt">
@@ -67,7 +65,7 @@
             </wsdl:fault>
         </wsdl:operation>
     </wsdl:binding>
->>>>>>> 2120019... Adding a test-case for adding + parsing a BinarySecurityToken
+    
     <wsdl:service name="DoubleItService">
         <wsdl:port name="DoubleItSignedSupportingPort" binding="tns:DoubleItStandardBinding">
             <soap:address location="http://localhost:9010/DoubleItSignedSupporting" />

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/bst-server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/bst-server.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/bst-server.xml
deleted file mode 100644
index b0782e5..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/bst-server.xml
+++ /dev/null
@@ -1,36 +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
        http://www.w3.org/ns/ws-policy                                  http://www.w3.org/2007/02/ws-policy.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="BinarySecurityToken"
address="http://localhost:${testutil.ports.BSTServer}/DoubleItBinarySecurityToken" serviceName="s:DoubleItService"
endpointName="s:DoubleItBinarySecurityTokenPort" implementor="org.apache.cxf.systest.ws.tokens.DoubleItBSTImpl"
wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
-        <jaxws:inInterceptors>
-            <bean class="org.apache.cxf.ws.security.wss4j.BinarySecurityTokenInterceptor"
/>
-        </jaxws:inInterceptors>
-    </jaxws:endpoint>
-    
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client.xml
deleted file mode 100644
index 5048afb..0000000
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client.xml
+++ /dev/null
@@ -1,177 +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           http://www.w3.org/ns/ws-policy  http://www.w3.org/2007/02/ws-policy.xsd">
-    <cxf:bus>
-        <cxf:features>
-            <p:policies/>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedSupportingPort"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedSupportingPort2"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedSupportingPort3"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItEncryptedSupportingPort"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItEncryptedSupportingPort2"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItEncryptedSupportingPort3"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedEncryptedSupportingPort"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-encrypted-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedEncryptedSupportingPort2"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/signed-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignedEncryptedSupportingPort3"
createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.username" value="Alice"/>
-            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.common.UTPasswordCallback"/>
-            <entry key="ws-security.encryption.properties" value="bob.properties"/>
-            <entry key="ws-security.encryption.username" value="bob"/>
-            <entry key="ws-security.signature.properties" value="alice.properties"/>
-            <entry key="ws-security.signature.username" value="alice"/>
-            <entry key="ws-security.username-token.always.encrypted" value="false"/>
-        </jaxws:properties>
-        <jaxws:features>
-            <p:policies>
-                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/tokens/encrypted-supp-token-policy.xml"/>
-            </p:policies>
-        </jaxws:features>
-    </jaxws:client>
-    
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItBinarySecurityTokenPort"
createdFromAPI="true">
-        <jaxws:outInterceptors>
-            <bean class="org.apache.cxf.ws.security.wss4j.BinarySecurityTokenInterceptor"
/>
-        </jaxws:outInterceptors>
-    </jaxws:client>
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client/client.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client/client.xml
index 807e8ef..d1f4d8d 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client/client.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/client/client.xml
@@ -246,5 +246,11 @@
             </p:policies>
         </jaxws:features>
     </jaxws:client>
+    
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItBinarySecurityTokenPort"
createdFromAPI="true">
+        <jaxws:outInterceptors>
+            <bean class="org.apache.cxf.ws.security.wss4j.BinarySecurityTokenInterceptor"
/>
+        </jaxws:outInterceptors>
+    </jaxws:client>
 	
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/ad1c0971/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/server/bst-server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/server/bst-server.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/server/bst-server.xml
new file mode 100644
index 0000000..b0782e5
--- /dev/null
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/tokens/server/bst-server.xml
@@ -0,0 +1,36 @@
+<?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
        http://www.w3.org/ns/ws-policy                                  http://www.w3.org/2007/02/ws-policy.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="BinarySecurityToken"
address="http://localhost:${testutil.ports.BSTServer}/DoubleItBinarySecurityToken" serviceName="s:DoubleItService"
endpointName="s:DoubleItBinarySecurityTokenPort" implementor="org.apache.cxf.systest.ws.tokens.DoubleItBSTImpl"
wsdlLocation="org/apache/cxf/systest/ws/tokens/DoubleItTokens.wsdl">
+        <jaxws:inInterceptors>
+            <bean class="org.apache.cxf.ws.security.wss4j.BinarySecurityTokenInterceptor"
/>
+        </jaxws:inInterceptors>
+    </jaxws:endpoint>
+    
+</beans>


Mime
View raw message