cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject [2/6] cxf git commit: [CXF-6800]add http-undertow transport
Date Fri, 26 Feb 2016 03:50:52 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/StatefulGreeterImpl.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/StatefulGreeterImpl.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/StatefulGreeterImpl.java
new file mode 100644
index 0000000..97fc7a5
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/StatefulGreeterImpl.java
@@ -0,0 +1,96 @@
+/**
+ * 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.http_undertow;
+
+import java.util.concurrent.Future;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.types.GreetMeResponse;
+import org.apache.cxf.greeter_control.types.PingMeResponse;
+import org.apache.cxf.greeter_control.types.SayHiResponse;
+
+@WebService(serviceName = "GreeterService",
+            portName = "GreeterPort",
+            endpointInterface = "org.apache.cxf.greeter_control.Greeter", 
+            targetNamespace = "http://cxf.apache.org/greeter_control")
+public class StatefulGreeterImpl implements Greeter {
+    String name;
+    
+    // greetMe will use session to return last called name
+    public String greetMe(String me) {
+        name = me;
+        return "Hello " + me;
+    }
+    
+
+    public String sayHi() {
+        return "Bonjour " + name;
+    }
+    
+    public void pingMe() {
+    }
+
+
+    public Future<?> greetMeAsync(String requestType, AsyncHandler<GreetMeResponse> asyncHandler) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public Response<GreetMeResponse> greetMeAsync(String requestType) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public void greetMeOneWay(String requestType) {
+        // TODO Auto-generated method stub
+        
+    }
+
+
+    public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> asyncHandler) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public Response<PingMeResponse> pingMeAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public Response<SayHiResponse> sayHiAsync() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/ThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/ThreadPoolTest.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/ThreadPoolTest.java
new file mode 100644
index 0000000..e0c7ba1
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/ThreadPoolTest.java
@@ -0,0 +1,112 @@
+/**
+ * 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.http_undertow;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests thread pool config.
+ */
+
+public class ThreadPoolTest extends AbstractClientServerTestBase {
+    private static final String ADDRESS = Server.ADDRESS;
+    private static final QName SERVICE_NAME = 
+        new QName("http://apache.org/hello_world_soap_http", "SOAPServiceAddressing");
+
+    private Greeter greeter;
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, true));
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
+        greeter = new SOAPService(wsdl, SERVICE_NAME).getPort(Greeter.class);
+        BindingProvider bp = (BindingProvider)greeter;
+        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                                   ADDRESS);
+    }
+    
+    class TestRunnable implements Runnable {
+        int i;
+        long total;
+        
+        TestRunnable(int i) {
+            this.i = i;
+        }
+        public void run() {
+            long start = System.currentTimeMillis();
+            try {
+                greeter.greetMeLater(1600);
+            } catch (Throwable t) {
+                //ignore
+            }
+            long end = System.currentTimeMillis();
+            total = end - start;
+        }
+        public long getTotal() {
+            return total;
+        }
+    }
+
+
+    @Test
+
+    public void testFallbackThreadPoolConfig() throws Exception {
+        //make sure things are running
+        greeter.greetMeLater(1);
+        greeter.greetMeLater(1);
+        TestRunnable r[] = new TestRunnable[5];
+        Thread[] invokers = new Thread[5];
+        for (int i = 0; i < invokers.length; i++) {
+            r[i] = new TestRunnable(i);
+            invokers[i] = new Thread(r[i]);
+            invokers[i].setDaemon(true);
+            invokers[i].start();
+        }
+        
+        int countLess = 0;
+        int countMore = 0;
+        for (int i = 0; i < invokers.length; i++) {
+            invokers[i].join(6 * 1000);
+            if (r[i].getTotal() > 3000) {
+                countMore++;
+            } else {
+                countLess++;
+            }
+        }
+
+        assertTrue(countLess >= 2 && countLess <= 3);
+        assertTrue(countMore >= 2 && countMore <= 3);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthHandler.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthHandler.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthHandler.java
new file mode 100644
index 0000000..eb39c47
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthHandler.java
@@ -0,0 +1,80 @@
+/**
+ * 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.http_undertow;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.transport.http_undertow.CXFUndertowHttpHandler;
+
+import io.undertow.security.api.AuthenticationMechanism;
+import io.undertow.security.api.AuthenticationMode;
+import io.undertow.security.handlers.AuthenticationCallHandler;
+import io.undertow.security.handlers.AuthenticationConstraintHandler;
+import io.undertow.security.handlers.AuthenticationMechanismsHandler;
+import io.undertow.security.handlers.SecurityInitialHandler;
+import io.undertow.security.idm.IdentityManager;
+import io.undertow.security.impl.BasicAuthenticationMechanism;
+import io.undertow.server.HttpHandler;
+import io.undertow.server.HttpServerExchange;
+
+public class UndertowBasicAuthHandler implements CXFUndertowHttpHandler {
+    
+    private HttpHandler next;
+    private HttpHandler securityHandler;
+    private IdentityManager identityManager;
+
+    @Override
+    public void handleRequest(HttpServerExchange exchange) throws Exception {
+        if (identityManager == null) {
+            buildIdMgr();
+        }
+        if (securityHandler == null) {
+            buildSecurityHandler();
+        }
+        this.securityHandler.handleRequest(exchange);
+    }
+
+    private void buildSecurityHandler() {
+        HttpHandler handler = this.next;
+        handler = new AuthenticationCallHandler(handler);
+        handler = new AuthenticationConstraintHandler(handler);
+        final List<AuthenticationMechanism> mechanisms 
+            = Collections.<AuthenticationMechanism>singletonList(new BasicAuthenticationMechanism("My Realm"));
+        handler = new AuthenticationMechanismsHandler(handler, mechanisms);
+        this.securityHandler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler);
+        
+    }
+
+    @Override
+    public void setNext(HttpHandler nextHandler) {
+        this.next = nextHandler;
+    }
+    
+    private void buildIdMgr() {
+        final Map<String, char[]> users = new HashMap<>(1);
+        users.put("ffang", "pswd".toCharArray());
+        
+        identityManager = new MapIdentityManager(users);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthServer.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthServer.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthServer.java
new file mode 100644
index 0000000..616794f
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthServer.java
@@ -0,0 +1,70 @@
+/**
+ * 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.http_undertow;
+
+
+import java.net.URL;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+
+public class UndertowBasicAuthServer extends AbstractBusTestServerBase  {
+    static final String PORT = allocatePort(UndertowBasicAuthServer.class);
+    static final String ADDRESS = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+
+    Endpoint ep;
+    
+    protected void run()  {
+        String configurationFile = "undertowBasicAuthServer.xml";
+        URL configure =
+            UndertowBasicAuthServer.class.getResource(configurationFile);
+        Bus bus = new SpringBusFactory().createBus(configure, true);
+        bus.getInInterceptors().add(new LoggingInInterceptor());
+        bus.getOutInterceptors().add(new LoggingOutInterceptor());
+        SpringBusFactory.setDefaultBus(bus);
+        setBus(bus);
+
+        GreeterImpl implementor = new GreeterImpl();
+        ep = Endpoint.publish(ADDRESS, implementor);
+    }
+    
+    public void tearDown() throws Exception {
+        if (ep != null) {
+            ep.stop();
+            ep = null;
+        }
+    }
+    
+    public static void main(String[] args) {
+        try { 
+            UndertowBasicAuthServer s = new UndertowBasicAuthServer(); 
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthTest.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthTest.java
new file mode 100644
index 0000000..c479789
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowBasicAuthTest.java
@@ -0,0 +1,102 @@
+/**
+ * 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.http_undertow;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.CXFBusFactory;
+import org.apache.cxf.configuration.security.AuthorizationPolicy;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transport.http.HTTPConduitConfigurer;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.Before;
+import org.junit.BeforeClass;
+
+/**
+ * Tests thread pool config.
+ */
+
+public class UndertowBasicAuthTest extends AbstractClientServerTestBase {
+    private static final String ADDRESS = UndertowBasicAuthServer.ADDRESS;
+    private static final QName SERVICE_NAME = 
+        new QName("http://apache.org/hello_world_soap_http", "SOAPServiceAddressing");
+
+    private Greeter greeter;
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", 
+                   launchServer(UndertowBasicAuthServer.class, true));
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
+        greeter = new SOAPService(wsdl, SERVICE_NAME).getPort(Greeter.class);
+        BindingProvider bp = (BindingProvider)greeter;
+        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor()); 
+        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                                   ADDRESS);
+        bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "ffang");
+        bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pswd");
+    }
+
+    @org.junit.Test
+    public void testBasicAuth() throws Exception { 
+        assertEquals("Hello Alice", greeter.greetMe("Alice"));
+    }
+    
+    @org.junit.Test
+    public void testGetWSDL() throws Exception {
+        BusFactory bf = CXFBusFactory.newInstance();
+        Bus bus = bf.createBus();
+        bus.getInInterceptors().add(new LoggingInInterceptor());
+        bus.getOutInterceptors().add(new LoggingOutInterceptor());
+       
+        MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
+        bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
+        JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
+        factory.createClient(ADDRESS + "?wsdl");
+    }
+
+    private static class MyHTTPConduitConfigurer implements HTTPConduitConfigurer {
+        public void configure(String name, String address, HTTPConduit c) {
+
+            AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
+
+            authorizationPolicy.setUserName("ffang");
+            authorizationPolicy.setPassword("pswd");
+            authorizationPolicy.setAuthorizationType("Basic");
+            c.setAuthorization(authorizationPolicy);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthHandler.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthHandler.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthHandler.java
new file mode 100644
index 0000000..674aa06
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthHandler.java
@@ -0,0 +1,81 @@
+/**
+ * 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.http_undertow;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.transport.http_undertow.CXFUndertowHttpHandler;
+
+import io.undertow.security.api.AuthenticationMechanism;
+import io.undertow.security.api.AuthenticationMode;
+import io.undertow.security.handlers.AuthenticationCallHandler;
+import io.undertow.security.handlers.AuthenticationConstraintHandler;
+import io.undertow.security.handlers.AuthenticationMechanismsHandler;
+import io.undertow.security.handlers.SecurityInitialHandler;
+import io.undertow.security.idm.IdentityManager;
+import io.undertow.security.impl.DigestAuthenticationMechanism;
+import io.undertow.server.HttpHandler;
+import io.undertow.server.HttpServerExchange;
+
+public class UndertowDigestAuthHandler implements CXFUndertowHttpHandler {
+    
+    private HttpHandler next;
+    private HttpHandler securityHandler;
+    private IdentityManager identityManager;
+
+    @Override
+    public void handleRequest(HttpServerExchange exchange) throws Exception {
+        if (identityManager == null) {
+            buildIdMgr();
+        }
+        if (securityHandler == null) {
+            buildSecurityHandler();
+        }
+        this.securityHandler.handleRequest(exchange);
+    }
+
+    private void buildSecurityHandler() {
+        HttpHandler handler = this.next;
+        handler = new AuthenticationCallHandler(handler);
+        handler = new AuthenticationConstraintHandler(handler);
+        final List<AuthenticationMechanism> mechanisms 
+            = Collections.<AuthenticationMechanism>singletonList(
+              new DigestAuthenticationMechanism("WSRealm", "WSDomain", "DIGEST", this.identityManager));
+        handler = new AuthenticationMechanismsHandler(handler, mechanisms);
+        this.securityHandler = new SecurityInitialHandler(AuthenticationMode.PRO_ACTIVE, identityManager, handler);
+        
+    }
+
+    @Override
+    public void setNext(HttpHandler nextHandler) {
+        this.next = nextHandler;
+    }
+    
+    private void buildIdMgr() {
+        final Map<String, char[]> users = new HashMap<>(1);
+        users.put("ffang", "pswd".toCharArray());
+        
+        identityManager = new MapIdentityManager(users);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthTest.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthTest.java
new file mode 100644
index 0000000..cbcbfbf
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/UndertowDigestAuthTest.java
@@ -0,0 +1,202 @@
+/**
+ * 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.http_undertow;
+
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.CXFBusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.configuration.security.AuthorizationPolicy;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transport.http.HTTPConduitConfigurer;
+import org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit;
+import org.apache.cxf.transport.http.auth.DigestAuthSupplier;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.apache.hello_world_soap_http.Greeter;
+import org.apache.hello_world_soap_http.SOAPService;
+import org.apache.http.auth.Credentials;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests thread pool config.
+ */
+
+public class UndertowDigestAuthTest extends AbstractClientServerTestBase {
+    private static final String PORT = allocatePort(UndertowDigestAuthTest.class);
+    private static final String ADDRESS = "http://127.0.0.1:" + PORT + "/SoapContext/SoapPort";
+    private static final QName SERVICE_NAME = 
+        new QName("http://apache.org/hello_world_soap_http", "SOAPServiceAddressing");
+
+    private Greeter greeter;
+
+    
+    public static class UndertowDigestServer extends AbstractBusTestServerBase  {
+        Endpoint ep;
+        
+        protected void run()  {
+            String configurationFile = "undertowDigestServer.xml";
+            URL configure =
+                UndertowBasicAuthServer.class.getResource(configurationFile);
+            Bus bus = new SpringBusFactory().createBus(configure, true);
+            //bus.getInInterceptors().add(new LoggingInInterceptor());
+            //bus.getOutInterceptors().add(new LoggingOutInterceptor());
+            SpringBusFactory.setDefaultBus(bus);
+            setBus(bus);
+
+            GreeterImpl implementor = new GreeterImpl();
+            ep = Endpoint.publish(ADDRESS, implementor);
+        }
+        
+        public void tearDown() throws Exception {
+            if (ep != null) {
+                ep.stop();
+                ep = null;
+            }
+        }
+    }
+    
+    
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", 
+                   launchServer(UndertowDigestServer.class, true));
+    }
+
+    private HTTPConduit setupClient(boolean async) throws Exception {
+        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
+        greeter = new SOAPService(wsdl, SERVICE_NAME).getPort(Greeter.class);
+        BindingProvider bp = (BindingProvider)greeter;
+        ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor()); 
+        bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
+                                   ADDRESS);
+        HTTPConduit cond = (HTTPConduit)ClientProxy.getClient(greeter).getConduit();
+        HTTPClientPolicy client = new HTTPClientPolicy();
+        client.setConnectionTimeout(600000);
+        client.setReceiveTimeout(600000);
+        cond.setClient(client);
+        if (async) {
+            if (cond instanceof AsyncHTTPConduit) {
+                UsernamePasswordCredentials creds = new UsernamePasswordCredentials("ffang", "pswd");
+                bp.getRequestContext().put(Credentials.class.getName(), creds);
+                bp.getRequestContext().put(AsyncHTTPConduit.USE_ASYNC, Boolean.TRUE);
+                client.setAutoRedirect(true);
+            } else {
+                fail("Not an async conduit");
+            }
+        } else {
+            bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "ffang");
+            bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pswd");
+            cond.setAuthSupplier(new DigestAuthSupplier());
+        }
+        
+        ClientProxy.getClient(greeter).getOutInterceptors()
+            .add(new AbstractPhaseInterceptor<Message>(Phase.PRE_STREAM_ENDING) {
+                
+                public void handleMessage(Message message) throws Fault {
+                    Map<String, ?> headers = CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));
+                    if (headers.containsKey("Proxy-Authorization")) {
+                        throw new RuntimeException("Should not have Proxy-Authorization");
+                    }
+                }
+            });
+        client.setAllowChunking(false);
+        return cond;
+    }
+
+    @Test
+    public void testDigestAuth() throws Exception {
+        //CXF will handle the auth stuff within it's conduit implementation
+        doTest(false);
+    }
+    @Test
+    public void testDigestAuthAsyncClient() throws Exception {
+        //We'll let HTTP async handle it.  Useful for things like NTLM 
+        //which async client can handle but we cannot.
+        doTest(true);
+    }
+  
+    private void doTest(boolean async) throws Exception {
+        setupClient(async);
+        assertEquals("Hello Alice", greeter.greetMe("Alice"));
+        assertEquals("Hello Bob", greeter.greetMe("Bob"));
+
+        try {
+            BindingProvider bp = (BindingProvider)greeter;
+            if (async) {
+                UsernamePasswordCredentials creds = new UsernamePasswordCredentials("blah", "foo");
+                bp.getRequestContext().put(Credentials.class.getName(), creds);
+            } else {
+                bp.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "blah");
+                bp.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "foo");
+            }
+            greeter.greetMe("Alice");
+            fail("Password was wrong, should have failed");
+        } catch (WebServiceException wse) {
+            //ignore - expected
+        }
+    }
+    
+    @Test
+    public void testGetWSDL() throws Exception {
+        BusFactory bf = CXFBusFactory.newInstance();
+        Bus bus = bf.createBus();
+        bus.getInInterceptors().add(new LoggingInInterceptor());
+        bus.getOutInterceptors().add(new LoggingOutInterceptor());
+       
+        MyHTTPConduitConfigurer myHttpConduitConfig = new MyHTTPConduitConfigurer();
+        bus.setExtension(myHttpConduitConfig, HTTPConduitConfigurer.class);
+        JaxWsDynamicClientFactory factory = JaxWsDynamicClientFactory.newInstance(bus);
+        factory.createClient(ADDRESS + "?wsdl");
+    }
+
+    private static class MyHTTPConduitConfigurer implements HTTPConduitConfigurer {
+        public void configure(String name, String address, HTTPConduit c) {
+
+            AuthorizationPolicy authorizationPolicy = new AuthorizationPolicy();
+
+            authorizationPolicy.setUserName("ffang");
+            authorizationPolicy.setPassword("pswd");
+            authorizationPolicy.setAuthorizationType("Digest");
+            c.setAuthorization(authorizationPolicy);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ClientServerWrappedContinuationTest.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ClientServerWrappedContinuationTest.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ClientServerWrappedContinuationTest.java
new file mode 100644
index 0000000..6a976d4
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ClientServerWrappedContinuationTest.java
@@ -0,0 +1,159 @@
+/**
+ * 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.http_undertow.continuations;
+
+import java.net.URL;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class ClientServerWrappedContinuationTest extends AbstractClientServerTestBase {
+    public static final String PORT = allocatePort(Server.class);
+    public static final String HTTPS_PORT = allocatePort(Server.class, 1);
+    
+    private static final String CLIENT_CONFIG_FILE =
+        "org/apache/cxf/systest/http_undertow/continuations/cxf.xml";
+    private static final String CLIENT_HTTPS_CONFIG_FILE =
+        "org/apache/cxf/systest/http_undertow/continuations/cxf_https.xml";
+    private static final String SERVER_CONFIG_FILE =
+        "org/apache/cxf/systest/http_undertow/continuations/jaxws-server.xml";
+    
+    public static class Server extends AbstractBusTestServerBase {
+
+        protected void run() {
+            SpringBusFactory bf = new SpringBusFactory();
+            Bus bus = bf.createBus(SERVER_CONFIG_FILE);
+            setBus(bus);
+            BusFactory.setDefaultBus(bus);
+            
+            Object implementor = new HelloImplWithWrapppedContinuation();
+            String address = "http://localhost:" + PORT + "/hellocontinuation";
+            EndpointImpl endpointImpl = (EndpointImpl)Endpoint.publish(address, implementor);
+            endpointImpl.getInInterceptors().add(new LoggingInInterceptor());
+            endpointImpl.getOutInterceptors().add(new LoggingOutInterceptor()); 
+            address = "https://localhost:" + HTTPS_PORT + "/securecontinuation";
+            Endpoint.publish(address, implementor);
+        }
+
+        public static void main(String[] args) {
+            try {
+                Server s = new Server();
+                s.start();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                System.exit(-1);
+            }
+        }
+    }
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
+    }
+
+    @Test
+    public void testHttpWrappedContinuations() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus(CLIENT_CONFIG_FILE);
+        BusFactory.setDefaultBus(bus);
+        
+        QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+        
+        URL wsdlURL = new URL("http://localhost:" + PORT + "/hellocontinuation?wsdl");
+        
+        HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+        assertNotNull(service);
+        final HelloContinuation helloPort = service.getHelloContinuationPort();
+        ClientProxy.getClient(helloPort).getInInterceptors().add(new LoggingInInterceptor());
+        ClientProxy.getClient(helloPort).getOutInterceptors().add(new LoggingOutInterceptor());
+        doTest(helloPort);
+        bus.shutdown(true);
+    }
+        
+    @Test
+    public void testHttpsWrappedContinuations() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus(CLIENT_HTTPS_CONFIG_FILE);
+        BusFactory.setDefaultBus(bus);
+        
+        QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+        
+        URL wsdlURL = new URL("https://localhost:" + HTTPS_PORT + "/securecontinuation?wsdl");
+        
+        HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+        assertNotNull(service);
+        final HelloContinuation helloPort = service.getHelloContinuationPort();
+        doTest(helloPort);
+        bus.shutdown(true);
+    }
+
+    private void doTest(final HelloContinuation helloPort) throws Exception {
+        ThreadPoolExecutor executor = new ThreadPoolExecutor(10, 10, 0, TimeUnit.SECONDS,
+                                                             new ArrayBlockingQueue<Runnable>(6));
+        CountDownLatch startSignal = new CountDownLatch(1);
+        CountDownLatch controlDoneSignal = new CountDownLatch(5);
+        CountDownLatch helloDoneSignal = new CountDownLatch(5);
+
+        executor.execute(new ControlWorker(helloPort, "Fred", startSignal, controlDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
+        
+        executor.execute(new ControlWorker(helloPort, "Barry", startSignal, controlDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
+        
+        executor.execute(new ControlWorker(helloPort, "Harry", startSignal, controlDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
+        
+        executor.execute(new ControlWorker(helloPort, "Rob", startSignal, controlDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
+        
+        executor.execute(new ControlWorker(helloPort, "James", startSignal, controlDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
+        
+        startSignal.countDown();
+        
+        controlDoneSignal.await(100, TimeUnit.SECONDS);
+        helloDoneSignal.await(100, TimeUnit.SECONDS);
+        executor.shutdownNow();
+        assertEquals("Not all invocations have been resumed", 0, controlDoneSignal.getCount());
+        assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+        
+        helloPort.sayHi("Dan1", "to:100");
+        helloPort.sayHi("Dan2", "to:100");
+        helloPort.sayHi("Dan3", "to:100");
+    }
+    
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ControlWorker.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ControlWorker.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ControlWorker.java
new file mode 100644
index 0000000..f624d73
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/ControlWorker.java
@@ -0,0 +1,59 @@
+/**
+ * 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.http_undertow.continuations;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.Assert;
+
+public class ControlWorker implements Runnable {
+
+    private HelloContinuation helloPort;
+    private String firstName; 
+    private CountDownLatch startSignal;
+    private CountDownLatch resumeSignal;
+    public ControlWorker(HelloContinuation helloPort,
+                         String firstName,
+                         CountDownLatch startSignal,
+                         CountDownLatch resumeSignal) {
+        this.helloPort = helloPort;
+        this.firstName = firstName;
+        this.startSignal = startSignal;
+        this.resumeSignal = resumeSignal;
+    }
+    
+    public void run() {
+        try {
+            startSignal.await();
+            if (!helloPort.isRequestSuspended(firstName)) {
+                Assert.fail("No suspended invocation for " + firstName);
+            }
+            helloPort.resumeRequest(firstName);
+            resumeSignal.countDown();
+        } catch (InterruptedException ex) {
+            // ignore
+        } catch (RuntimeException ex) {
+            ex.printStackTrace();
+            Assert.fail("Control thread for " + firstName + " failed");
+        }
+        
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuation.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuation.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuation.java
new file mode 100644
index 0000000..9df05d7
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuation.java
@@ -0,0 +1,36 @@
+/**
+ * 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.http_undertow.continuations;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
+@WebService(name = "HelloContinuation", targetNamespace = "http://cxf.apache.org/systest/jaxws")
+public interface HelloContinuation {
+    @WebMethod(operationName = "sayHi", exclude = false)
+    String sayHi(String firstName, String secondName);
+    
+    @WebMethod(operationName = "isRequestSuspended", exclude = false)
+    boolean isRequestSuspended(String name);
+    
+    @WebMethod(operationName = "resumeRequest", exclude = false)
+    void resumeRequest(String name);
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuationService.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuationService.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuationService.java
new file mode 100644
index 0000000..f7eea8e
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloContinuationService.java
@@ -0,0 +1,49 @@
+/**
+ * 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.http_undertow.continuations;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+/**
+ * 
+ */
+
+@WebServiceClient(name = "HelloService", 
+                  targetNamespace = "http://cxf.apache.org/systest/jaxws", 
+                  wsdlLocation = "testutils/hello.wsdl")
+public class HelloContinuationService extends Service {
+    static final QName SERVICE = 
+        new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+    static final QName HELLO_PORT = 
+        new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationPort");
+    public HelloContinuationService(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    @WebEndpoint(name = "HelloContinuationPort")
+    public HelloContinuation getHelloContinuationPort() {
+        return super.getPort(HELLO_PORT, HelloContinuation.class);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloImplWithWrapppedContinuation.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloImplWithWrapppedContinuation.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloImplWithWrapppedContinuation.java
new file mode 100644
index 0000000..aa067ff
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloImplWithWrapppedContinuation.java
@@ -0,0 +1,129 @@
+/**
+ * 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.http_undertow.continuations;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+
+import org.apache.cxf.continuations.Continuation;
+import org.apache.cxf.continuations.ContinuationProvider;
+
+
+@WebService(name = "HelloContinuation", 
+            serviceName = "HelloContinuationService", 
+            portName = "HelloContinuationPort", 
+            targetNamespace = "http://cxf.apache.org/systest/jaxws",
+            endpointInterface = "org.apache.cxf.systest.http_undertow.continuations.HelloContinuation")
+public class HelloImplWithWrapppedContinuation implements HelloContinuation {
+    
+    
+    private Map<String, Continuation> suspended = 
+        new HashMap<String, Continuation>();
+    
+    
+    @Resource
+    private WebServiceContext context;
+    
+    public String sayHi(String firstName, String secondName) {
+        
+        Continuation continuation = getContinuation(firstName);
+        if (continuation == null) {
+            throw new RuntimeException("Failed to get continuation");
+        }
+        synchronized (continuation) {
+            if (continuation.isNew()) {
+                Object userObject = secondName != null && secondName.length() > 0 
+                                    ? secondName : null;
+                continuation.setObject(userObject);
+                long timeout = 20000;
+                if (secondName.startsWith("to:")) {
+                    timeout = Long.parseLong(secondName.substring(3));
+                }
+                suspendInvocation(firstName, continuation, timeout);
+            } else {
+                StringBuilder sb = new StringBuilder();
+                sb.append(firstName);
+                
+                // if the actual parameter is not null 
+                if (secondName != null && secondName.length() > 0) {
+                    String surname = continuation.getObject().toString();
+                    sb.append(' ').append(surname);
+                }
+                // System.out.println("Saying hi to " + sb.toString());
+                return "Hi " + sb.toString();
+            }
+        }
+        // unreachable
+        return null;
+    }
+
+    public boolean isRequestSuspended(String name) {
+        synchronized (suspended) {
+            while (!suspended.containsKey(name)) {
+                try {
+                    suspended.wait(10000);
+                } catch (InterruptedException ex) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    public void resumeRequest(final String name) {
+        
+        Continuation suspendedCont = null;
+        synchronized (suspended) {
+            suspendedCont = suspended.get(name);
+        }
+        
+        if (suspendedCont != null) {
+            synchronized (suspendedCont) {
+                suspendedCont.resume();
+            }
+        }
+    }
+    
+    private void suspendInvocation(String name, Continuation cont, long timeout) {
+        try {
+            cont.suspend(timeout);    
+        } finally {
+            synchronized (suspended) {
+                suspended.put(name, cont);
+                suspended.notifyAll();
+            }
+        }
+    }
+    
+    private Continuation getContinuation(String name) {
+        synchronized (suspended) {
+            Continuation suspendedCont = suspended.remove(name);
+            if (suspendedCont != null) {
+                return suspendedCont;
+            }
+        }
+        
+        ContinuationProvider provider = 
+            (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
+        return provider.getContinuation();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloWorker.java
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloWorker.java b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloWorker.java
new file mode 100644
index 0000000..fc85173
--- /dev/null
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/continuations/HelloWorker.java
@@ -0,0 +1,67 @@
+/**
+ * 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.http_undertow.continuations;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.Assert;
+
+public class HelloWorker implements Runnable {
+
+    private HelloContinuation helloPort;
+    private String firstName;
+    private String secondName;
+    private CountDownLatch startSignal;
+    private CountDownLatch doneSignal;
+    public HelloWorker(HelloContinuation helloPort,
+                       String firstName,
+                       String secondName,
+                       CountDownLatch startSignal,
+                       CountDownLatch doneSignal) {
+        this.helloPort = helloPort;
+        this.firstName = firstName;
+        this.secondName = secondName;
+        this.startSignal = startSignal;
+        this.doneSignal = doneSignal;
+    }
+    
+    public void run() {
+        StringBuilder expected = new StringBuilder();
+        expected.append(firstName);
+        if (secondName != null && secondName.length() > 0) {
+            expected.append(' ').append(secondName);
+        }
+        
+        try {
+            startSignal.await();
+            
+            Assert.assertEquals("Wrong hello", "Hi " + expected.toString(), 
+                                helloPort.sayHi(firstName, secondName));
+            doneSignal.countDown();
+        } catch (InterruptedException ex) {
+            // ignore
+        } catch (RuntimeException ex) {
+            ex.printStackTrace();
+            Assert.fail("Hello thread failed for : " + expected.toString());
+        } 
+        
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Bethal.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Bethal.jks b/systests/transport-undertow/src/test/resources/keys/Bethal.jks
new file mode 100644
index 0000000..8da2ad0
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Bethal.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Bethal.p12
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Bethal.p12 b/systests/transport-undertow/src/test/resources/keys/Bethal.p12
new file mode 100644
index 0000000..5b627c5
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Bethal.p12 differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Gordy.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Gordy.jks b/systests/transport-undertow/src/test/resources/keys/Gordy.jks
new file mode 100644
index 0000000..8fa8847
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Gordy.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Morpit.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Morpit.jks b/systests/transport-undertow/src/test/resources/keys/Morpit.jks
new file mode 100644
index 0000000..b179baf
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Morpit.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Morpit.p12
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Morpit.p12 b/systests/transport-undertow/src/test/resources/keys/Morpit.p12
new file mode 100644
index 0000000..b18c8ed
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Morpit.p12 differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Poltim.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Poltim.jks b/systests/transport-undertow/src/test/resources/keys/Poltim.jks
new file mode 100644
index 0000000..f3b3e68
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Poltim.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Tarpin.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Tarpin.jks b/systests/transport-undertow/src/test/resources/keys/Tarpin.jks
new file mode 100644
index 0000000..cf1ceb6
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Tarpin.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Truststore.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Truststore.jks b/systests/transport-undertow/src/test/resources/keys/Truststore.jks
new file mode 100644
index 0000000..0abd848
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/Truststore.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/Truststore.pem
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/Truststore.pem b/systests/transport-undertow/src/test/resources/keys/Truststore.pem
new file mode 100644
index 0000000..c04eaf8
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/keys/Truststore.pem
@@ -0,0 +1,86 @@
+-----BEGIN CERTIFICATE-----
+MIIDSTCCAjGgAwIBAgIEGFcAsjANBgkqhkiG9w0BAQsFADBVMQswCQYDVQQGEwJVUzERMA8GA1UE
+BxMIU3lyYWN1c2UxEzARBgNVBAoTCkF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ONA/gzmsT5BVu0EueE4s9RtXCvK+vR+l2o1fwHW0gtIkQShvR8RBGZjf
+9onepE27U/Uya/+CxQWb3K17g+kCAwEAAaMhMB8wHQYDVR0OBBYEFKI4clFM35A+xunrsFmmuN8i
+Rc/gMA0GCSqGSIb3DQEBCwUAA4IBAQCceUMhVspIAMhA4JMdXgdowWhVEY9vhKJhoILRQ4wdorLs
+pQrUZMBxB7juJ2RdOCO+17Y2gYJi4F1HYaPn0q70iZQRAH4AxiSGPpKD9Qxgs4wIHZgzZ5NwCkko
+AXmSM+SyNiDDZBFd01120gmw40Ly8/3HcDR/um6/kx/YAKgJhc6fDGpzQOrLnoTxeyVV1twAmA+R
+PcrmRA6NAS8baWlzUXAYu8pq/xTOl77niKdAvndmtmlEDmsj0BXeXeCURRVODYU8cMTueudHjois
+tj5C6jX6xjGz1/XcXUaZX5Lr34GixSwJRzabrrGYl7S2sKHmEBUUoB4hortyb2Ufedg+
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/alice.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/alice.jks b/systests/transport-undertow/src/test/resources/keys/alice.jks
new file mode 100644
index 0000000..213b26c
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/alice.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/bob.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/bob.jks b/systests/transport-undertow/src/test/resources/keys/bob.jks
new file mode 100644
index 0000000..5550912
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/bob.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/cxfca.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/cxfca.jks b/systests/transport-undertow/src/test/resources/keys/cxfca.jks
new file mode 100644
index 0000000..53ad239
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/cxfca.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/genkeys.sh
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/genkeys.sh b/systests/transport-undertow/src/test/resources/keys/genkeys.sh
new file mode 100755
index 0000000..a01a569
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/keys/genkeys.sh
@@ -0,0 +1,53 @@
+
+# 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.
+
+#
+# This file generates a number of keys/certificates and keystores for 
+# names to be used with corresponding CXF configuration files (*.cxf).
+#
+
+#
+# Start with a clean slate. Remove all keystores.
+#
+rm -f *.jks
+rm -f Truststore.pem
+
+#
+# This function generates a key/self-signed certificate with the following DN.
+#  "CN=$1, OU=$2, O=ApacheTest, L=Syracuse, C=US" and adds it to 
+# the truststore.
+#
+function genkey {
+    keytool -genkey -alias $2 -keystore $2.jks -dname "CN=$1, OU=$2, O=ApacheTest, L=Syracuse, C=US" -keyalg RSA -keypass password -storepass password -storetype jks -validity 10000
+    keytool -export -file $2.cer -alias $2 -keystore $2.jks -storepass password
+    keytool -import -file $2.cer -alias $2 -noprompt -keystore Truststore.jks -storepass password
+}
+
+#
+# We generate keys/certificates with the following CN=<name> OU=<name>
+# The CN used to be "localhost" to conform to the default HostnameVerifier of
+# HttpsURLConnection so it would work for tests. However, we have enhanced
+# the HTTP Conduit logic to accept anything in the CN in favor of the 
+# MessageTrustDecider callback making the verification determination.
+#
+for name in Bethal Gordy Tarpin Poltim Morpit
+do
+   genkey $name $name
+   keytool -export -keystore Truststore.jks -storepass password -alias $i -rfc >> Truststore.pem
+done
+

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/keys/subjalt.jks
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/keys/subjalt.jks b/systests/transport-undertow/src/test/resources/keys/subjalt.jks
new file mode 100644
index 0000000..fefac18
Binary files /dev/null and b/systests/transport-undertow/src/test/resources/keys/subjalt.jks differ

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/SessionServer.xml
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/SessionServer.xml b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/SessionServer.xml
new file mode 100644
index 0000000..cf12454
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/SessionServer.xml
@@ -0,0 +1,46 @@
+<?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:sec="http://cxf.apache.org/configuration/security" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:httpu="http://cxf.apache.org/transports/http-undertow/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="                    http://cxf.apache.org/configuration/security                       http://cxf.apache.org/schemas/configuration/security.xsd            http://cxf.apache.org/transports/http/configuration               http://cxf.apache.org/schemas/configuration/http-conf.xsd            http://cxf.apache.org/transports/http-undertow/configuration               http://cxf.apache.org/schemas/configuration/http-undertow.xsd            http://cxf.apache.org/jaxws                    http://cxf.apache.org/schemas/jaxws.xsd            http://www.springframework.org/schema/beans               http://www.springframework.org/
 schema/beans/spring-beans.xsd">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    <httpu:engine-factory bus="cxf">
+        <httpu:engine port="${testutil.ports.SessionServer}">
+        </httpu:engine>
+    </httpu:engine-factory>
+    <jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/SoapContext/GreeterPort" implementor="org.apache.cxf.systest.http_undertow.GreeterSessionImpl">
+        <jaxws:properties>
+            <entry key="org.apache.cxf.oneway.robust" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/Stateful1" implementorClass="org.apache.cxf.systest.http_undertow.StatefulGreeterImpl">
+        <jaxws:invoker>
+            <bean class="org.apache.cxf.jaxws.JAXWSMethodInvoker">
+                <constructor-arg>
+                    <bean class="org.apache.cxf.service.invoker.SessionFactory">
+                        <constructor-arg value="org.apache.cxf.systest.http_undertow.StatefulGreeterImpl"/>
+                    </bean>
+                </constructor-arg>
+            </bean>
+        </jaxws:invoker>
+    </jaxws:endpoint>
+    <jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/Stateful2" implementorClass="org.apache.cxf.systest.http_undertow.SessionAnnotationGreeterImpl"/>
+    <jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/PerRequest" implementorClass="org.apache.cxf.systest.http_undertow.PerRequestAnnotationGreeterImpl"/>
+    <bean id="SpringBean" class="org.apache.cxf.systest.http_undertow.SpringAnnotationGreeterImpl"/>
+    <jaxws:endpoint address="http://localhost:${testutil.ports.SessionServer}/SpringBean" implementorClass="org.apache.cxf.systest.http_undertow.SpringAnnotationGreeterImpl"/>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf.xml
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf.xml b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf.xml
new file mode 100644
index 0000000..2e67318
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf.xml
@@ -0,0 +1,24 @@
+<?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" xsi:schemaLocation="        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://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <http:conduit name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.http-conduit">
+        <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
+    </http:conduit>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf_https.xml
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf_https.xml b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf_https.xml
new file mode 100644
index 0000000..272926c
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/cxf_https.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:http="http://cxf.apache.org/transports/http/configuration" xmlns:jaxws="http://cxf.apache.org/jaxws" 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/transports/http/configuration         http://cxf.apache.org/schemas/configuration/http-conf.xsd         http://cxf.apache.org/transports/http-undertow/configuration   http://cxf.apache.org/schemas/configuration/http-undertow.xsd         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    <!-- -->
+    <!-- HTTP/S configuration for clients -->
+    <!-- -->
+    <http:conduit name="https://localhost:.*">
+        <http:client ConnectionTimeout="3000000" ReceiveTimeout="3000000"/>
+        <http:tlsClientParameters disableCNCheck="true">
+            <sec:keyManagers keyPassword="password">
+                <sec:keyStore type="JKS" password="password" resource="keys/Morpit.jks"/>
+            </sec:keyManagers>
+            <sec:trustManagers>
+                <sec:keyStore type="JKS" password="password" resource="keys/Truststore.jks"/>
+            </sec:trustManagers>
+        </http:tlsClientParameters>
+    </http:conduit>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/e61a83d4/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/jaxws-server.xml
----------------------------------------------------------------------
diff --git a/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/jaxws-server.xml b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/jaxws-server.xml
new file mode 100644
index 0000000..725ba01
--- /dev/null
+++ b/systests/transport-undertow/src/test/resources/org/apache/cxf/systest/http_undertow/continuations/jaxws-server.xml
@@ -0,0 +1,47 @@
+<?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:httpu="http://cxf.apache.org/transports/http-undertow/configuration" 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/transports/http/configuration         http://cxf.apache.org/schemas/configuration/http-conf.xsd         http://cxf.apache.org/transports/http-undertow/configuration   http://cxf.apache.org/schemas/configuration/http-undertow.xsd         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd         ">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    <!-- -->
+    <!-- This Spring config file is designed to represent a minimal -->
+    <!-- configuration for spring-loading a CXF servant, where the -->
+    <!-- servant listens using HTTP/S as the transport protocol. -->
+    <!-- -->
+    <!-- Note that the service endpoint is spring-loaded.  In the -->
+    <!-- scenario in which this config is designed to run, the -->
+    <!-- server application merely instantiates a Bus, and does not -->
+    <!-- publish any services programmatically -->
+    <!-- -->
+    <!-- -->
+    <!-- TLS Port configuration parameters for port 9091 -->
+    <!-- -->
+    <httpu:engine-factory>
+        <httpu:engine port="${testutil.ports.Server.1}">
+            <httpu:tlsServerParameters>
+                <sec:keyManagers keyPassword="password">
+                    <sec:keyStore type="JKS" password="password" resource="keys/Bethal.jks"/>
+                </sec:keyManagers>
+                <sec:trustManagers>
+                    <sec:keyStore type="JKS" password="password" resource="keys/Truststore.jks"/>
+                </sec:trustManagers>
+            </httpu:tlsServerParameters>
+        </httpu:engine>
+    </httpu:engine-factory>
+</beans>


Mime
View raw message