Fixing merge
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4586fe5b Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4586fe5b Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4586fe5b Branch: refs/heads/3.1.x-fixes Commit: 4586fe5b01c92a5353ff73bd0966d2a54329bb8b Parents: 375c356 Author: Colm O hEigeartaigh <cohei...@apache.org> Authored: Tue Mar 28 16:31:44 2017 +0100 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Tue Mar 28 16:31:44 2017 +0100 ---------------------------------------------------------------------- .../ws/rm/sec/WSRMWithWSSecurityPolicyTest.java | 34 -------------- .../ws/policy/handler/HelloServiceImpl.java | 48 -------------------- .../cxf/systest/ws/wssc/WSSCUnitTest.java | 12 ----- .../systest/ws/x509/DoubleItPropertiesImpl.java | 7 --- 4 files changed, 101 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java ---------------------------------------------------------------------- diff --git a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java index c70f57d..c944a4f 100644 --- a/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java +++ b/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/sec/WSRMWithWSSecurityPolicyTest.java @@ -96,39 +96,6 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas @Test public void testContextProperty() throws Exception { -<<<<<<< HEAD - ClassPathXmlApplicationContext context = - new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml"); - Bus bus = (Bus)context.getBean("bus"); - BusFactory.setDefaultBus(bus); - BusFactory.setThreadDefaultBus(bus); - Greeter greeter = (Greeter)context.getBean("GreeterCombinedClientNoProperty"); - Client client = ClientProxy.getClient(greeter); - QName operationQName = new QName("http://cxf.apache.org/greeter_control", "greetMe"); - BindingOperationInfo boi = client.getEndpoint().getBinding().getBindingInfo().getOperation(operationQName); - Map<String, Object> invocationContext = new HashMap<String, Object>(); - Map<String, Object> requestContext = new HashMap<String, Object>(); - Map<String, Object> responseContext = new HashMap<String, Object>(); - invocationContext.put(Client.REQUEST_CONTEXT, requestContext); - invocationContext.put(Client.RESPONSE_CONTEXT, responseContext); - - requestContext.put("ws-security.username", "Alice"); - requestContext.put("ws-security.callback-handler", "org.apache.cxf.systest.ws.rm.sec.UTPasswordCallback"); - requestContext.put("ws-security.encryption.properties", "bob.properties"); - requestContext.put("ws-security.encryption.username", "bob"); - requestContext.put("ws-security.signature.properties", "alice.properties"); - requestContext.put("ws-security.signature.username", "alice"); - RMManager manager = bus.getExtension(RMManager.class); - boolean empty = manager.getRetransmissionQueue().isEmpty(); - assertTrue("RetransmissionQueue is not empty", empty); - GreetMe param = new GreetMe(); - param.setRequestType("testContextProperty"); - Object[] answer = client.invoke(boi, new Object[]{param}, invocationContext); - Assert.assertEquals("TESTCONTEXTPROPERTY", answer[0].toString()); - Thread.sleep(5000); - empty = manager.getRetransmissionQueue().isEmpty(); - assertTrue("RetransmissionQueue not empty", empty); -======= try (ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("org/apache/cxf/systest/ws/rm/sec/client-policy.xml")) { Bus bus = (Bus)context.getBean("bus"); @@ -162,7 +129,6 @@ public class WSRMWithWSSecurityPolicyTest extends AbstractBusClientServerTestBas empty = manager.getRetransmissionQueue().isEmpty(); assertTrue("RetransmissionQueue not empty", empty); } ->>>>>>> 428f770... Switching to use security constants in the tests instead of strings } } http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java index f597037..38c8f13 100644 --- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java +++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/policy/handler/HelloServiceImpl.java @@ -1,50 +1,3 @@ -<<<<<<< HEAD -/** - * 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.policy.handler; - -import javax.jws.HandlerChain; -import javax.jws.WebParam; -import javax.jws.WebResult; -import javax.jws.WebService; - -import org.apache.cxf.annotations.EndpointProperties; -import org.apache.cxf.annotations.EndpointProperty; - -@WebService(name = "HelloPolicyService", serviceName = "HelloPolicyService") -@EndpointProperties(value = { - @EndpointProperty(key = "security.callback-handler", - value = "org.apache.cxf.systest.ws.policy.handler.CommonPasswordCallback"), - @EndpointProperty(key = "ws-security.is-bsp-compliant", value = "false"), - @EndpointProperty(key = "security.signature.properties", value = "alice.properties"), - @EndpointProperty(key = "security.signature.username", value = "alice") - }) -@HandlerChain(file = "handlers.xml") -public class HelloServiceImpl implements HelloService { - @Override - @WebResult(name = "result") - public boolean checkHello(@WebParam(name = "input") String input) throws MyFault { - throw new MyFault("myMessage", "myFaultInfo"); - } - -} -======= /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -91,4 +44,3 @@ public class HelloServiceImpl implements HelloService { } } ->>>>>>> 428f770... Switching to use security constants in the tests instead of strings http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java index 0a8812f..75142a4 100644 --- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java +++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java @@ -205,15 +205,9 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase { stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric"); stsClient.setPolicy(createSymmetricBindingPolicy()); -<<<<<<< HEAD - - Map<String, Object> properties = new HashMap<String, Object>(); - properties.put("security.encryption.username", "bob"); -======= Map<String, Object> properties = new HashMap<>(); properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob"); ->>>>>>> 428f770... Switching to use security constants in the tests instead of strings TokenCallbackHandler callbackHandler = new TokenCallbackHandler(); properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler); properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties"); @@ -246,15 +240,9 @@ public class WSSCUnitTest extends AbstractBusClientServerTestBase { stsClient.setLocation("http://localhost:" + PORT2 + "/" + "DoubleItSymmetric"); stsClient.setPolicy(createSymmetricBindingPolicy()); -<<<<<<< HEAD - - Map<String, Object> properties = new HashMap<String, Object>(); - properties.put("security.encryption.username", "bob"); -======= Map<String, Object> properties = new HashMap<>(); properties.put(SecurityConstants.ENCRYPT_USERNAME, "bob"); ->>>>>>> 428f770... Switching to use security constants in the tests instead of strings TokenCallbackHandler callbackHandler = new TokenCallbackHandler(); properties.put(SecurityConstants.CALLBACK_HANDLER, callbackHandler); properties.put(SecurityConstants.SIGNATURE_PROPERTIES, "alice.properties"); http://git-wip-us.apache.org/repos/asf/cxf/blob/4586fe5b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java ---------------------------------------------------------------------- diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java index b4a37a0..9575dca 100644 --- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java +++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/DoubleItPropertiesImpl.java @@ -34,17 +34,10 @@ import org.example.contract.doubleit.DoubleItPortType; @Features(features = "org.apache.cxf.feature.LoggingFeature") @EndpointProperties({ -<<<<<<< HEAD - @EndpointProperty(key = "security.encryption.username", value = "alice"), - @EndpointProperty(key = "security.encryption.properties", value = "alice.properties"), - @EndpointProperty(key = "security.signature.properties", value = "bob.properties"), - @EndpointProperty(key = "security.callback-handler", -======= @EndpointProperty(key = SecurityConstants.ENCRYPT_USERNAME, value = "alice"), @EndpointProperty(key = SecurityConstants.ENCRYPT_PROPERTIES, value = "alice.properties"), @EndpointProperty(key = SecurityConstants.SIGNATURE_PROPERTIES, value = "bob.properties"), @EndpointProperty(key = SecurityConstants.CALLBACK_HANDLER, ->>>>>>> 428f770... Switching to use security constants in the tests instead of strings value = "org.apache.cxf.systest.ws.common.KeystorePasswordCallback") }) public class DoubleItPropertiesImpl implements DoubleItPortType {