cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1089887 [5/6] - in /cxf/trunk/systests: ./ transport-jms/ transport-jms/src/ transport-jms/src/test/ transport-jms/src/test/java/ transport-jms/src/test/java/org/ transport-jms/src/test/java/org/apache/ transport-jms/src/test/java/org/apac...
Date Thu, 07 Apr 2011 14:11:54 GMT
Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/GreeterImplWithContinuationsJMS.java Thu Apr  7 14:11:51 2011
@@ -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.jms.continuations;
+
+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(serviceName = "HelloWorldService", 
+            portName = "HelloWorldPort",
+            endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "testutils/jms_test.wsdl")
+public class GreeterImplWithContinuationsJMS {    
+    
+    @Resource
+    protected WebServiceContext context;
+    private volatile boolean suspended; 
+    
+    public void greetMeOneWay(String name) {
+        throw new UnsupportedOperationException();
+    }
+    
+    public String sayHi() {
+        throw new UnsupportedOperationException();
+    }
+    
+    public void testRpcLitFault(String s) {
+        throw new UnsupportedOperationException();
+    }
+    
+    public String greetMe(String name) {
+        
+        Continuation continuation = getContinuation(name);
+        if (continuation == null) {
+            throw new RuntimeException("Failed to get continuation");
+        }
+        synchronized (continuation) {
+            if (continuation.isNew()) {
+                if (suspended) {
+                    throw new RuntimeException("Was already suspended");
+                }
+                Object userObject = "Fred".equals(name) ? "Ruby" : null;
+                continuation.setObject(userObject);
+                suspended = true;
+                continuation.suspend(2000);
+            } else {
+                if (!suspended) {
+                    throw new RuntimeException("Was not suspended yet");
+                }
+                if (continuation.isResumed()) {
+                    throw new RuntimeException("It must be a timeout");
+                }
+                StringBuilder sb = new StringBuilder();
+                sb.append(name);
+                
+                Object userObject = continuation.getObject();
+                if (userObject != null) {
+                    sb.append(' ').append(userObject.toString());
+                }
+                System.out.println("Saying hi to " + sb.toString());
+                return "Hi " + sb.toString();
+            }
+        }
+        // unreachable
+        return null;        
+    }
+    
+    private Continuation getContinuation(String name) {
+        
+        ContinuationProvider provider = 
+            (ContinuationProvider)context.getMessageContext().get(ContinuationProvider.class.getName());
+        return provider.getContinuation();
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HWSoapMessageDocProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HWSoapMessageDocProvider.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HWSoapMessageDocProvider.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HWSoapMessageDocProvider.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,138 @@
+/**
+ * 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.jms.continuations;
+
+import java.io.InputStream;
+
+import javax.annotation.Resource;
+import javax.xml.namespace.QName;
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPBody;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.ws.Provider;
+import javax.xml.ws.Service;
+import javax.xml.ws.ServiceMode;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.WebServiceProvider;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import org.apache.cxf.continuations.Continuation;
+import org.apache.cxf.continuations.ContinuationProvider;
+import org.apache.cxf.helpers.DOMUtils;
+
+
+
+@WebServiceProvider(serviceName = "HelloWorldService", 
+            portName = "HelloWorldPort",
+            targetNamespace = "http://cxf.apache.org/hello_world_jms",
+            wsdlLocation = "/org/apache/cxf/systest/jms/continuations/jms_test.wsdl")
+@ServiceMode(value = Service.Mode.MESSAGE)
+public class HWSoapMessageDocProvider implements Provider<SOAPMessage> {
+
+    private static QName sayHi = new QName("http://apache.org/hello_world_soap_http", "sayHi");
+    private static QName greetMe = new QName("http://apache.org/hello_world_soap_http", "greetMe");
+    
+    @Resource 
+    WebServiceContext ctx;
+    
+    private SOAPMessage sayHiResponse;
+    private SOAPMessage greetMeResponse;
+    
+    public HWSoapMessageDocProvider() {
+       
+        try {
+            MessageFactory factory = MessageFactory.newInstance();            
+            InputStream is = getClass().getResourceAsStream("resources/GreetMeDocLiteralResp.xml");
+            greetMeResponse =  factory.createMessage(null, is);
+            is.close();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+    
+    public SOAPMessage invoke(SOAPMessage request) {
+        try {
+            final MessageContext messageContext = ctx.getMessageContext();
+
+            ContinuationProvider contProvider = 
+                (ContinuationProvider) messageContext.get(ContinuationProvider.class.getName());
+            final Continuation continuation = contProvider.getContinuation();
+            
+            if (continuation.isNew()) {
+                continuation.suspend(5000);
+                new Thread(new Runnable() {
+                    public void run() {
+                        try {
+                            continuation.resume();
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }).start();
+                return null;
+            } else if (!continuation.isResumed()) {
+                continuation.reset();
+                throw new RuntimeException("time out");
+            } else {
+                return resumeMessage(request);
+            }
+        } catch (SOAPFaultException e) {
+            throw e;
+        } 
+        
+    }
+    
+    public SOAPMessage resumeMessage(SOAPMessage request) {
+        if (IncomingMessageCounterInterceptor.getMessageCount() != 1) {
+            throw new RuntimeException("IncomingMessageCounterInterceptor get invoked twice");
+        }
+        QName qn = (QName)ctx.getMessageContext().get(MessageContext.WSDL_OPERATION);
+        if (qn == null) {
+            throw new RuntimeException("No Operation Name");
+        }
+        
+        SOAPMessage response = null;        
+        try {
+            SOAPBody body = request.getSOAPBody();
+            Node n = body.getFirstChild();
+
+            while (n.getNodeType() != Node.ELEMENT_NODE) {
+                n = n.getNextSibling();
+            }
+            if (n.getLocalName().equals(sayHi.getLocalPart())) {
+                response = sayHiResponse;
+            } else if (n.getLocalName().equals(greetMe.getLocalPart())) {
+                Element el = DOMUtils.getFirstElement(n);
+                String v = DOMUtils.getContent(el);
+                if (v.contains("Return sayHi")) {
+                    response = sayHiResponse;
+                } else {
+                    response = greetMeResponse;
+                }
+            }
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+        return response;
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuation.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuation.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuation.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuation.java Thu Apr  7 14:11:51 2011
@@ -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.jms.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);
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuationService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuationService.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuationService.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloContinuationService.java Thu Apr  7 14:11:51 2011
@@ -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.jms.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 (HelloContinuation)super.getPort(HELLO_PORT, HelloContinuation.class);
+    }
+
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorker.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorker.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorker.java Thu Apr  7 14:11:51 2011
@@ -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.jms.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());
+        } 
+        
+    }
+    
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsClientServerTest.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,100 @@
+/**
+ * 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.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+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 org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class HelloWorldContinuationsClientServerTest extends AbstractBusClientServerTestBase {
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = Server2.PORT;
+    
+    private static boolean serversStarted;
+    private static final String CONFIG_FILE =
+        "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+
+    @Before
+    public void startServers() throws Exception {
+        if (serversStarted) {
+            return;
+        }
+        Map<String, String> props = new HashMap<String, String>();                
+        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+            props.put("org.apache.activemq.default.directory.prefix", 
+                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        }
+        props.put("java.util.logging.config.file", 
+                  System.getProperty("java.util.logging.config.file"));
+        
+        assertTrue("server did not launch correctly", 
+                   launchServer(org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher.class, props, null));
+
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server2.class, true));
+        serversStarted = true;
+    }
+    
+    @Test
+    public void testHttpWrappedContinuatuions() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus(CONFIG_FILE);
+        BusFactory.setDefaultBus(bus);
+        
+        QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+        
+        URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test.wsdl");
+        
+        HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+        assertNotNull(service);
+        final HelloContinuation helloPort = service.getHelloContinuationPort();
+        
+        ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+                                                             new ArrayBlockingQueue<Runnable>(10));
+        CountDownLatch startSignal = new CountDownLatch(1);
+        CountDownLatch helloDoneSignal = new CountDownLatch(5);
+        
+        executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
+        
+        startSignal.countDown();
+        helloDoneSignal.await(60, TimeUnit.SECONDS);
+        executor.shutdownNow();
+        assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+    }
+        
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldContinuationsThrottleTest.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,105 @@
+/**
+ * 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.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+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 org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class HelloWorldContinuationsThrottleTest extends AbstractBusClientServerTestBase {
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+
+    private static boolean serversStarted;
+    private static final String CONFIG_FILE =
+        "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+
+    @Before
+    public void startServers() throws Exception {
+        if (serversStarted) {
+            return;
+        }
+        Map<String, String> props = new HashMap<String, String>();                
+        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+            props.put("org.apache.activemq.default.directory.prefix", 
+                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        }
+        props.put("java.util.logging.config.file", 
+                  System.getProperty("java.util.logging.config.file"));
+        
+        assertTrue("server did not launch correctly", 
+                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server3.class));
+        serversStarted = true;
+    }
+    
+    @Test
+    public void testHttpWrappedContinuatuions() throws Exception {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus(CONFIG_FILE);
+        BusFactory.setDefaultBus(bus);
+        
+        QName serviceName = new QName("http://cxf.apache.org/systest/jaxws", "HelloContinuationService");
+        
+        URL wsdlURL = getClass().getResource("/org/apache/cxf/systest/jms/continuations/test2.wsdl");
+        String wsdlString = wsdlURL.toString().intern();
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+        HelloContinuationService service = new HelloContinuationService(wsdlURL, serviceName);
+        assertNotNull(service);
+        final HelloContinuation helloPort = service.getHelloContinuationPort();
+        
+        ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+                                                             new ArrayBlockingQueue<Runnable>(10));
+        CountDownLatch startSignal = new CountDownLatch(1);
+        CountDownLatch helloDoneSignal = new CountDownLatch(5);
+        
+        executor.execute(new HelloWorker(helloPort, "Fred", "", startSignal, helloDoneSignal));
+        startSignal.countDown();
+        
+        Thread.sleep(10000);
+                
+        executor.execute(new HelloWorker(helloPort, "Barry", "Jameson", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Harry", "", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "Rob", "Davidson", startSignal, helloDoneSignal));
+        executor.execute(new HelloWorker(helloPort, "James", "ServiceMix", startSignal, helloDoneSignal));
+        
+                
+        helloDoneSignal.await(60, TimeUnit.SECONDS);
+        executor.shutdownNow();
+        System.out.println("Completed : " + (5 - helloDoneSignal.getCount()));
+        assertEquals("Not all invocations have completed", 0, helloDoneSignal.getCount());
+    }
+        
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,153 @@
+/**
+ * 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.jms.continuations;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+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.jms.continuations.HelloContinuation",
+            wsdlLocation = "org/apache/cxf/systest/jms/continuations/test.wsdl")
+public class HelloWorldWithContinuationsJMS implements HelloContinuation {    
+    
+    private Map<String, Continuation> suspended = 
+        new HashMap<String, Continuation>();
+    private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+                                        new ArrayBlockingQueue<Runnable>(10));
+    
+    @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);
+                suspendInvocation(firstName, continuation);
+            } else {
+                if (!continuation.isResumed()) {
+                    throw new RuntimeException("No timeout expected");
+                }
+                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(1000);
+                } catch (InterruptedException ex) {
+                    return false;
+                }
+            }
+        }
+        System.out.println("Invocation for " + name + " has been suspended");
+        
+        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(final String name, Continuation cont) {
+        
+        System.out.println("Suspending invocation for " + name);
+        
+        try {
+            cont.suspend(500000);    
+        } finally {
+            synchronized (suspended) {
+                suspended.put(name, cont);
+            }
+            executor.execute(new Runnable() {
+                public void run() {
+                    try {
+                        Thread.sleep(2000);
+                    } catch (InterruptedException ex) {
+                        // ignore
+                    }       
+                    resumeRequest(name);
+                }
+            });
+        }
+    }
+    
+    private Continuation getContinuation(String name) {
+        
+        System.out.println("Getting continuation for " + 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();
+    }
+    
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/HelloWorldWithContinuationsJMS2.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,156 @@
+/**
+ * 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.jms.continuations;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+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.jms.continuations.HelloContinuation",
+            wsdlLocation = "org/apache/cxf/systest/jms/continuations/test2.wsdl")
+public class HelloWorldWithContinuationsJMS2 implements HelloContinuation {    
+    
+    private Map<String, Continuation> suspended = 
+        new HashMap<String, Continuation>();
+    private Executor executor = new ThreadPoolExecutor(5, 5, 0, TimeUnit.SECONDS,
+                                        new ArrayBlockingQueue<Runnable>(10));
+    
+    @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);
+                suspendInvocation(firstName, continuation);
+            } else {
+                if (!continuation.isResumed() && !"Fred".equals(firstName)) {
+                    throw new RuntimeException("No timeout expected");
+                }
+                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(1000);
+                } catch (InterruptedException ex) {
+                    return false;
+                }
+            }
+        }
+        System.out.println("Invocation for " + name + " has been suspended");
+        
+        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(final String name, Continuation cont) {
+        
+        System.out.println("Suspending invocation for " + name);
+        
+        try {
+            long timeout = "Fred".equals(name) ? 8000 : 4000;
+            cont.suspend(timeout);    
+        } finally {
+            synchronized (suspended) {
+                suspended.put(name, cont);
+            }
+            if (!"Fred".equals(name)) {
+                executor.execute(new Runnable() {
+                    public void run() {
+                        try {
+                            Thread.sleep(2000);
+                        } catch (InterruptedException ex) {
+                            // ignore
+                        }       
+                        resumeRequest(name);
+                    }
+                });
+            }
+        }
+    }
+    
+    private Continuation getContinuation(String name) {
+        
+        System.out.println("Getting continuation for " + 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();
+    }
+    
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/IncomingMessageCounterInterceptor.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,44 @@
+/**
+ * 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.jms.continuations;
+
+import org.apache.cxf.interceptor.AttachmentInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+
+public class IncomingMessageCounterInterceptor extends AbstractPhaseInterceptor<Message> {
+    
+    private static int messageCount;
+    
+    public IncomingMessageCounterInterceptor() {
+        super(Phase.RECEIVE);
+        getBefore().add(AttachmentInInterceptor.class.getName());
+    }
+
+    
+    public void handleMessage(Message message) throws Fault {
+        messageCount++;
+    }
+    
+    public static int getMessageCount() {
+        return messageCount;
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/JMSContinuationsClientServerTest.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,90 @@
+/**
+ * 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.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.hello_world_jms.HelloWorldPortType;
+import org.apache.cxf.hello_world_jms.HelloWorldService;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class JMSContinuationsClientServerTest extends AbstractBusClientServerTestBase {
+    protected static boolean serversStarted;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = Server.PORT;
+
+
+    @Before
+    public void startServers() throws Exception {
+        if (serversStarted) {
+            return;
+        }
+        Map<String, String> props = new HashMap<String, String>();                
+        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+            props.put("org.apache.activemq.default.directory.prefix",
+                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        }
+        props.put("java.util.logging.config.file", 
+                  System.getProperty("java.util.logging.config.file"));
+        
+        assertTrue("server did not launch correctly", 
+                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, false));
+        serversStarted = true;
+    }
+    
+    public URL getWSDLURL(String s) throws Exception {
+        return getClass().getResource(s);
+    }
+    public QName getServiceName(QName q) {
+        return q;
+    }
+    public QName getPortName(QName q) {
+        return q;
+    }
+    
+        
+    @Test
+    public void testContinuationWithTimeout() throws Exception {
+        QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
+                                 "HelloWorldService"));
+        QName portName = getPortName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
+        URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+        assertNotNull(wsdl);
+        String wsdlString = wsdl.toString();
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+
+        HelloWorldService service = new HelloWorldService(wsdl, serviceName);
+        assertNotNull(service);
+
+        HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
+        assertEquals("Hi Fred Ruby", greeter.greetMe("Fred"));
+    }
+        
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderJMSContinuationTest.java Thu Apr  7 14:11:51 2011
@@ -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.jms.continuations;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.hello_world_jms.HelloWorldPortType;
+import org.apache.cxf.hello_world_jms.HelloWorldService;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class ProviderJMSContinuationTest extends AbstractBusClientServerTestBase {
+    protected static boolean serversStarted;
+    static final String JMS_PORT = EmbeddedJMSBrokerLauncher.PORT;
+    static final String PORT = ProviderServer.PORT;
+
+
+    @Before
+    public void startServers() throws Exception {
+        if (serversStarted) {
+            return;
+        }
+        Map<String, String> props = new HashMap<String, String>();                
+        if (System.getProperty("org.apache.activemq.default.directory.prefix") != null) {
+            props.put("org.apache.activemq.default.directory.prefix",
+                      System.getProperty("org.apache.activemq.default.directory.prefix"));
+        }
+        props.put("java.util.logging.config.file", 
+                  System.getProperty("java.util.logging.config.file"));
+        
+        assertTrue("server did not launch correctly", 
+                   launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
+
+        assertTrue("server did not launch correctly", 
+                   launchServer(ProviderServer.class, false));
+        serversStarted = true;
+    }
+    
+    public URL getWSDLURL(String s) throws Exception {
+        return getClass().getResource(s);
+    }
+    public QName getServiceName(QName q) {
+        return q;
+    }
+    public QName getPortName(QName q) {
+        return q;
+    }
+    
+        
+    @Test
+    public void testProviderContinuation() throws Exception {
+        try {
+            QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", 
+                                 "HelloWorldService"));
+            QName portName = getPortName(
+                    new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort"));
+            URL wsdl = getWSDLURL("/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+            assertNotNull(wsdl);
+            String wsdlString = wsdl.toString();
+            EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(), wsdlString);
+
+            HelloWorldService service = new HelloWorldService(wsdl, serviceName);
+            assertNotNull(service);
+            HelloWorldPortType greeter = service.getPort(portName, HelloWorldPortType.class);
+            greeter.greetMe("ffang");
+        } catch (Exception ex) {
+            fail("shouldn't get exception here, which is caused by " 
+                    + ex.getMessage());
+        }     
+    }
+        
+}
+

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/ProviderServer.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,54 @@
+/**
+ * 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.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class ProviderServer extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(ProviderServer.class);
+
+
+    protected void run()  {
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+            "/org/apache/cxf/systest/jms/continuations/jms_test.wsdl");
+
+        Object implementor = new HWSoapMessageDocProvider();        
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+        Endpoint endpoint = Endpoint.publish(address, implementor);
+        ((EndpointImpl)endpoint).getInInterceptors().add(new IncomingMessageCounterInterceptor());
+    }
+
+
+    public static void main(String[] args) {
+        try {
+            ProviderServer s = new ProviderServer();
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally {
+            System.out.println("done!");
+        }
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,51 @@
+/**
+ * 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.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server.class);
+
+    protected void run()  {
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+            "testutils/jms_test.wsdl");
+
+        Object implementor = new GreeterImplWithContinuationsJMS();        
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+        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);
+        } finally {
+            System.out.println("done!");
+        }
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server2.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,50 @@
+/**
+ * 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.jms.continuations;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server2 extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server2.class);
+   
+    protected void run()  {
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(BusFactory.getDefaultBus(),
+                                                      "org/apache/cxf/systest/jms/continuations/test.wsdl");
+        Object implementor = new HelloWorldWithContinuationsJMS();        
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+        Endpoint.publish(address, implementor);
+    }
+
+
+    public static void main(String[] args) {
+        try {
+            Server2 s = new Server2();
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally {
+            System.out.println("done!");
+        }
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/Server3.java Thu Apr  7 14:11:51 2011
@@ -0,0 +1,58 @@
+/**
+ * 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.jms.continuations;
+
+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.testutil.common.AbstractBusTestServerBase;
+import org.apache.cxf.testutil.common.EmbeddedJMSBrokerLauncher;
+
+public class Server3 extends AbstractBusTestServerBase {
+    public static final String PORT = allocatePort(Server3.class);
+
+    private static final String CONFIG_FILE =
+        "org/apache/cxf/systest/jms/continuations/jms_test_config.xml";
+   
+    protected void run()  {
+        SpringBusFactory bf = new SpringBusFactory();
+        Bus bus = bf.createBus(CONFIG_FILE);
+        BusFactory.setDefaultBus(bus);
+        EmbeddedJMSBrokerLauncher.updateWsdlExtensors(bus, 
+                                                      "org/apache/cxf/systest/jms/continuations/test2.wsdl");
+        Object implementor = new HelloWorldWithContinuationsJMS2();        
+        String address = "http://localhost:" + PORT + "/SoapContext/SoapPort";
+        Endpoint.publish(address, implementor);
+    }
+
+
+    public static void main(String[] args) {
+        try {
+            Server3 s = new Server3();
+            s.start();
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            System.exit(-1);
+        } finally {
+            System.out.println("done!");
+        }
+    }
+}

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test.wsdl Thu Apr  7 14:11:51 2011
@@ -0,0 +1,177 @@
+<?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.
+-->
+<definitions name="HelloWorldService" 
+    targetNamespace="http://cxf.apache.org/hello_world_jms" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:jms="http://cxf.apache.org/transports/jms" 
+    xmlns:x1="http://cxf.apache.org/hello_world_jms/types"
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://cxf.apache.org/hello_world_jms" 
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <types>
+        <schema targetNamespace="http://cxf.apache.org/hello_world_jms/types"      xmlns="http://www.w3.org/2001/XMLSchema" xmlns:x1="http://cxf.apache.org/hello_world_jms/types" elementFormDefault="qualified">
+	    <complexType name="ErrorCode">
+		<sequence>
+		    <element name="minor" type="short"/>
+		    <element name="major" type="short"/>
+		</sequence>
+	    </complexType>
+	    <complexType name="testRpcLitFault">
+		<sequence>
+		    <element name="faultType" type="string"/>
+		</sequence>
+	    </complexType>
+	    <complexType name="testRpcLitFaultResponse">
+		<sequence/>
+	    </complexType>
+	    
+	    <element name="NoSuchCodeLit" type="x1:NoSuchCodeLit"/>
+	    <complexType name="NoSuchCodeLit">
+		<sequence>
+		    <element name="code" type="x1:ErrorCode"/>
+		</sequence>
+	    </complexType>
+
+	    <element name="BadRecordLit" type="x1:BadRecordLit"/>
+	    <complexType name="BadRecordLit">
+		<sequence>
+		    <element name="reason" type="string"/>
+		    <element name="code" type="short"/>
+		</sequence>
+	    </complexType>
+	</schema>
+    </types>
+
+    <message name="greetMe">
+        <part name="stringParam0" type="xsd:string"/>
+    </message>
+    <message name="greetMeResponse">
+        <part name="return" type="xsd:string"/>
+    </message>
+    <message name="sayHi"/>
+    <message name="sayHiResponse">
+        <part name="return" type="xsd:string"/>
+    </message>
+    <message name="greetMeOneWay">
+        <part name="stringParam0" type="xsd:string"/>
+    </message>
+    
+    <message name="testRpcLitFaultRequest">
+        <part name="in" type="xsd:string"/>
+    </message>
+    <message name="testRpcLitFaultResponse">
+        <part name="out" type="x1:testRpcLitFaultResponse"/>
+    </message>
+    <message name="NoSuchCodeLitFault">
+        <part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/>
+    </message>
+    <message name="BadRecordLitFault">
+        <part name="BadRecordLit" element="x1:BadRecordLit"/>
+    </message>
+    
+    <portType name="HelloWorldPortType">
+        <operation name="greetMe">
+            <input message="tns:greetMe" name="greetMe"/>
+            <output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </operation>
+        <operation name="sayHi">
+            <input message="tns:sayHi" name="sayHi"/>
+            <output message="tns:sayHiResponse" name="sayHiResponse"/>
+        </operation>
+        <operation name="greetMeOneWay">
+            <input message="tns:greetMeOneWay" name="greetMeOneWay"/>
+        </operation>
+        <operation name="testRpcLitFault">
+            <input name="testRpcLitFaultRequest" message="tns:testRpcLitFaultRequest"/>
+            <output name="testRpcLitFaultResponse" message="tns:testRpcLitFaultResponse"/>
+            <fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>
+            <fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>
+        </operation>
+    </portType>
+    
+    
+    <binding name="HelloWorldPortBinding" type="tns:HelloWorldPortType">
+        <soap:binding style="rpc" transport="http://cxf.apache.org/transports/jms"/>
+        <operation name="greetMe">
+            <soap:operation soapAction="" style="rpc"/>
+            <input name="greetMe">
+                <soap:body 
+                    namespace="http://cxf.apache.org/hello_world_jms" use="literal"/>
+            </input>
+            <output name="greetMeResponse">
+                <soap:body  
+                    namespace="http://cxf.apache.org/hello_world_jms" use="literal"/>
+            </output>
+        </operation>
+        <operation name="sayHi">
+            <soap:operation soapAction="" style="rpc"/>
+            <input name="sayHi">
+                <soap:body 
+                    namespace="http://cxf.apache.org/hello_world_jms" use="literal"/>
+            </input>
+            <output name="sayHiResponse">
+                <soap:body 
+                    namespace="http://cxf.apache.org/hello_world_jms" use="literal"/>
+            </output>
+        </operation>
+        <operation name="greetMeOneWay">
+            <soap:operation style="rpc"/>
+            <input name="greetMeOneWay">
+                <soap:body 
+                    namespace="http://cxf.apache.org/hello_world_jms" use="literal"/>
+            </input>
+        </operation>
+
+         <operation name="testRpcLitFault">
+            <soap:operation style="rpc"/>
+            <input>
+                <soap:body namespace="http://cxf.apache.org/hello_world_jms"  use="literal"/>
+            </input>
+            <output>
+                <soap:body namespace="http://cxf.apache.org/hello_world_jms"  use="literal"/>
+            </output>
+            <fault name="NoSuchCodeLitFault">
+                <soap:fault name="NoSuchCodeLitFault" use="literal"/>
+            </fault>
+            <fault name="BadRecordLitFault">
+                <soap:fault name="BadRecordLitFault" use="literal"/>
+            </fault>
+        </operation>
+    </binding>
+
+            
+    <service name="HelloWorldService">
+           <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">
+               <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory" 
+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">
+                   <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+               </jms:address>
+            
+               <jms:server durableSubscriberName="CXF_subscriber"/>
+           </port>
+    </service>
+    
+        
+</definitions>
+
+

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/jms_test_config.xml Thu Apr  7 14:11:51 2011
@@ -0,0 +1,74 @@
+<?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:ct="http://cxf.apache.org/configuration/types"
+    xmlns:jms="http://cxf.apache.org/transports/jms"
+    xmlns:p="http://www.springframework.org/schema/p"
+    xsi:schemaLocation="
+http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    
+    <jms:conduit name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.jms-conduit">
+      <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
+      <jms:address jndiConnectionFactoryName="ConnectionFactory" 
+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">
+                   <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+               </jms:address>
+      <jms:jmsConfig-ref>jmsConf1</jms:jmsConfig-ref>
+    </jms:conduit>
+    
+   <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
+  	p:brokerURL="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+  
+  <bean id="singleConnectionFactory"
+    class="org.springframework.jms.connection.SingleConnectionFactory" destroy-method="destroy">
+    <property name="targetConnectionFactory" ref="jmsConnectionFactory"/>
+  </bean>
+    
+  <bean id="jmsConf1" class="org.apache.cxf.transport.jms.JMSConfiguration"
+    p:connectionFactory-ref="singleConnectionFactory" 
+  	p:concurrentConsumers="1"
+  	p:maxConcurrentConsumers="1"/>
+
+  <jms:destination name="{http://cxf.apache.org/systest/jaxws}HelloContinuationPort.jms-destination">     
+      <jms:address jndiConnectionFactoryName="ConnectionFactory" 
+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">
+                   <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:${testutil.ports.EmbeddedJMSBrokerLauncher}"/>
+               </jms:address>
+      <jms:jmsConfig-ref>jmsConf2</jms:jmsConfig-ref>  
+  </jms:destination>
+
+  <bean id="jmsConf2" class="org.apache.cxf.transport.jms.JMSConfiguration"
+  	p:connectionFactory-ref="jmsConnectionFactory"
+  	p:timeToLive="500000"
+  	p:concurrentConsumers="1"
+  	p:maxConcurrentConsumers="1"
+  	p:maxSuspendedContinuations="1"
+  	p:cacheLevel="2"
+  />  
+
+</beans>

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/resources/GreetMeDocLiteralResp.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/resources/GreetMeDocLiteralResp.xml?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/resources/GreetMeDocLiteralResp.xml (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/resources/GreetMeDocLiteralResp.xml Thu Apr  7 14:11:51 2011
@@ -0,0 +1,20 @@
+<?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.
+-->
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:greetMeResponse xmlns:ns1="http://cxf.apache.org/hello_world_jms"><return xmlns:ns2="http://cxf.apache.org/hello_world_jms/types">Hi Fred Ruby</return></ns1:greetMeResponse></soap:Body></soap:Envelope>

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test.wsdl Thu Apr  7 14:11:51 2011
@@ -0,0 +1,87 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<definitions name="HelloContinuationService" 
+   targetNamespace="http://cxf.apache.org/systest/jaxws" 
+   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+   xmlns:tns="http://cxf.apache.org/systest/jaxws" 
+   xmlns="http://schemas.xmlsoap.org/wsdl/" 
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns:jms="http://cxf.apache.org/transports/jms">
+  
+  <message name="isRequestSuspended">
+    <part name="arg0" type="xsd:string"/>
+  </message>
+  <message name="sayHiResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+  <message name="sayHi">
+    <part name="arg0" type="xsd:string"/>
+    <part name="arg1" type="xsd:string"/>
+  </message>
+  <message name="resumeRequestResponse"/>
+
+  <message name="isRequestSuspendedResponse">
+    <part name="return" type="xsd:boolean"/>
+  </message>
+  
+  <message name="resumeRequest">
+    <part name="arg0" type="xsd:string"/>
+  </message>
+  <portType name="HelloContinuation">
+    <operation name="isRequestSuspended">
+      <input message="tns:isRequestSuspended" name="isRequestSuspended"/>
+      <output message="tns:isRequestSuspendedResponse" name="isRequestSuspendedResponse"/>
+    </operation>
+    <operation name="resumeRequest">
+      <input message="tns:resumeRequest" name="resumeRequest"/>
+      <output message="tns:resumeRequestResponse" name="resumeRequestResponse"/>
+    </operation>
+    <operation name="sayHi">
+      <input message="tns:sayHi" name="sayHi"/>
+      <output message="tns:sayHiResponse" name="sayHiResponse"/>
+    </operation>
+  </portType>
+  <binding name="HelloContinuationServiceSoapBinding" type="tns:HelloContinuation">
+    <soap:binding style="rpc" transport="http://cxf.apache.org/transports/jms" />
+    <operation name="isRequestSuspended">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="isRequestSuspended">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="isRequestSuspendedResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+    <operation name="resumeRequest">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="resumeRequest">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="resumeRequestResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+    <operation name="sayHi">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="sayHi">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="sayHiResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+  </binding>
+  <service name="HelloContinuationService">
+    <port binding="tns:HelloContinuationServiceSoapBinding" name="HelloContinuationPort">
+      <jms:clientConfig clientReceiveTimeout="500000" messageTimeToLive="500000"/>
+      <jms:serverConfig messageTimeToLive="500000"/>
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory" 
+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">
+                   <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61500"/>
+               </jms:address>
+            
+               <jms:server durableSubscriberName="CXF_subscriber"/>
+    </port>
+  </service>
+</definitions>
\ No newline at end of file

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test2.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test2.wsdl?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test2.wsdl (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/continuations/test2.wsdl Thu Apr  7 14:11:51 2011
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<definitions name="HelloContinuationService" 
+   targetNamespace="http://cxf.apache.org/systest/jaxws" 
+   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+   xmlns:tns="http://cxf.apache.org/systest/jaxws" 
+   xmlns="http://schemas.xmlsoap.org/wsdl/" 
+   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+   xmlns:jms="http://cxf.apache.org/transports/jms">
+  
+  <message name="isRequestSuspended">
+    <part name="arg0" type="xsd:string"/>
+  </message>
+  <message name="sayHiResponse">
+    <part name="return" type="xsd:string"/>
+  </message>
+  <message name="sayHi">
+    <part name="arg0" type="xsd:string"/>
+    <part name="arg1" type="xsd:string"/>
+  </message>
+  <message name="resumeRequestResponse"/>
+
+  <message name="isRequestSuspendedResponse">
+    <part name="return" type="xsd:boolean"/>
+  </message>
+  
+  <message name="resumeRequest">
+    <part name="arg0" type="xsd:string"/>
+  </message>
+  <portType name="HelloContinuation">
+    <operation name="isRequestSuspended">
+      <input message="tns:isRequestSuspended" name="isRequestSuspended"/>
+      <output message="tns:isRequestSuspendedResponse" name="isRequestSuspendedResponse"/>
+    </operation>
+    <operation name="resumeRequest">
+      <input message="tns:resumeRequest" name="resumeRequest"/>
+      <output message="tns:resumeRequestResponse" name="resumeRequestResponse"/>
+    </operation>
+    <operation name="sayHi">
+      <input message="tns:sayHi" name="sayHi"/>
+      <output message="tns:sayHiResponse" name="sayHiResponse"/>
+    </operation>
+  </portType>
+  <binding name="HelloContinuationServiceSoapBinding" type="tns:HelloContinuation">
+    <soap:binding style="rpc" transport="http://cxf.apache.org/transports/jms" />
+    <operation name="isRequestSuspended">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="isRequestSuspended">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="isRequestSuspendedResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+    <operation name="resumeRequest">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="resumeRequest">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="resumeRequestResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+    <operation name="sayHi">
+      <soap:operation soapAction="" style="rpc" />
+      <input name="sayHi">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </input>
+      <output name="sayHiResponse">
+        <soap:body namespace="http://cxf.apache.org/systest/jaxws" use="literal" />
+      </output>
+    </operation>
+  </binding>
+  <service name="HelloContinuationService">
+    <port binding="tns:HelloContinuationServiceSoapBinding" name="HelloContinuationPort"/>
+  </service>
+</definitions>
\ No newline at end of file

Added: cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/gzipBus.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/gzipBus.xml?rev=1089887&view=auto
==============================================================================
--- cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/gzipBus.xml (added)
+++ cxf/trunk/systests/transport-jms/src/test/java/org/apache/cxf/systest/jms/gzipBus.xml Thu Apr  7 14:11:51 2011
@@ -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:cxf="http://cxf.apache.org/core"
+      xmlns:jms="http://cxf.apache.org/transports/jms"
+      xsi:schemaLocation="
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/transports/jms http://cxf.apache.org/schemas/configuration/jms.xsd
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+
+    <cxf:bus>
+        <cxf:features>
+            <bean class="org.apache.cxf.feature.LoggingFeature"/>
+            <bean class="org.apache.cxf.transport.common.gzip.GZIPFeature">
+                <property name="threshold">
+                    <!-- set threshold as 10 byte to ensure gzip compress happen for short test message-->
+                    <value>10</value>
+                </property>
+            </bean>
+        </cxf:features>
+    </cxf:bus> 
+    <jms:conduit name="{http://apache.org/hello_world_doc_lit}SoapPort2.jms-conduit">
+        <!--must use binary message format for gzip compress-->
+        <jms:runtimePolicy messageType="binary"/>
+    </jms:conduit>
+</beans>
+



Mime
View raw message