Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 26980 invoked from network); 30 Jul 2009 10:53:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jul 2009 10:53:30 -0000 Received: (qmail 47746 invoked by uid 500); 30 Jul 2009 10:53:31 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 47664 invoked by uid 500); 30 Jul 2009 10:53:30 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 47655 invoked by uid 99); 30 Jul 2009 10:53:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 10:53:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jul 2009 10:53:19 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 67CAE238898B; Thu, 30 Jul 2009 10:52:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r799234 [2/2] - in /cxf/trunk: rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/ rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/ rt/transports/jms/src/main/resources/schemas/wsdl/ rt/transports/jms/sr... Date: Thu, 30 Jul 2009 10:52:57 -0000 To: commits@cxf.apache.org From: ningjiang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090730105259.67CAE238898B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,106 @@ +/** + * 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.jms.testsuite.testcases; + +import java.util.HashMap; +import java.util.Map; + +import javax.jms.Destination; +import javax.jms.Message; + +import org.apache.cxf.jms.testsuite.util.JMSTestUtil; +import org.apache.cxf.jms_simple.JMSSimplePortType; +import org.apache.cxf.jms_simple.JMSSimpleService0001; +import org.apache.cxf.systest.jms.EmbeddedJMSBrokerLauncher; +import org.apache.cxf.testsuite.testcase.TestCaseType; +import org.apache.cxf.transport.jms.uri.JMSEndpoint; +import org.apache.cxf.transport.jms.uri.JMSEndpointParser; + +import org.junit.BeforeClass; +import org.junit.Test; + +import org.springframework.jms.core.JmsTemplate; + +/** + * + */ +public class SOAPJMSTestSuiteClientTest extends AbstractSOAPJMSTestSuite { + + @BeforeClass + public static void startServers() throws Exception { + Map props = new HashMap(); + if (System.getProperty("activemq.store.dir") != null) { + props.put("activemq.store.dir", System.getProperty("activemq.store.dir")); + } + 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)); + } + + @Test + public void test0001() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0001"); + String address = testcase.getAddress().trim(); + JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(address); + String destinationName = endpoint.getDestinationName(); + + JmsTemplate jmsTemplate = JMSTestUtil.getJmsTemplate(address); + Destination dest = JMSTestUtil.getJmsDestination(jmsTemplate, destinationName, false); + + JMSSimplePortType simplePort = getPort("JMSSimpleService0001", "SimplePort", + JMSSimpleService0001.class, JMSSimplePortType.class); + simplePort.ping("test"); + + Message message = jmsTemplate.receive(dest); + try { + checkJMSProperties(message, testcase.getRequestMessage(), true); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + @Test + public void test0002() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0002"); + String address = testcase.getAddress().trim(); + JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(address); + String destinationName = endpoint.getDestinationName(); + + JmsTemplate jmsTemplate = JMSTestUtil.getJmsTemplate(address); + Destination dest = JMSTestUtil.getJmsDestination(jmsTemplate, destinationName, false); + + final JMSSimplePortType simplePort = getPort("JMSSimpleService0001", "SimplePort", + JMSSimpleService0001.class, + JMSSimplePortType.class); + Thread serviceThread = new Thread() { + public void run() { + simplePort.echo("test"); + } + }; + serviceThread.start(); + + Message message = jmsTemplate.receive(dest); + checkJMSProperties(message, testcase.getRequestMessage(), false); + + serviceThread.interrupt(); + } +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteClientTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,71 @@ +/** + * 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.jms.testsuite.testcases; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.cxf.jms.testsuite.services.Server; +import org.apache.cxf.systest.jms.EmbeddedJMSBrokerLauncher; + +import org.junit.BeforeClass; + +/** + * + */ +public class SOAPJMSTestSuiteServerTest extends AbstractSOAPJMSTestSuite { + + @BeforeClass + public static void startServers() throws Exception { + Map props = new HashMap(); + if (System.getProperty("activemq.store.dir") != null) { + props.put("activemq.store.dir", System.getProperty("activemq.store.dir")); + } + 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)); + } + +/* @Test + public void test0002() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0002"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService", "SimplePort", + JMSSimpleService.class, + JMSSimplePortType.class); + InvocationHandler handler = Proxy.getInvocationHandler(simplePort); + BindingProvider bp = null; + + if (handler instanceof BindingProvider) { + bp = (BindingProvider)handler; + } + + String response = simplePort.echo("test"); + assertEquals(response, "test"); + + if (bp != null) { + Map responseContext = bp.getResponseContext(); + Message m = (Message)responseContext + .get(JMSConstants.JMS_CLIENT_RESPONSE_JMSMESSAGE); + checkJMSProperties(m, testcase.getResponseMessage(), false); + } + }*/ +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteServerTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,251 @@ +/** + * 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.jms.testsuite.testcases; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Proxy; +import java.util.HashMap; +import java.util.Map; + +import javax.jms.DeliveryMode; +import javax.xml.ws.BindingProvider; + +import org.apache.cxf.jms.testsuite.services.Server; +import org.apache.cxf.jms.testsuite.util.JMSTestUtil; +import org.apache.cxf.jms_simple.JMSSimplePortType; +import org.apache.cxf.jms_simple.JMSSimpleService0001; +import org.apache.cxf.jms_simple.JMSSimpleService0003; +import org.apache.cxf.jms_simple.JMSSimpleService0005; +import org.apache.cxf.jms_simple.JMSSimpleService0006; +import org.apache.cxf.jms_simple.JMSSimpleService0008; +import org.apache.cxf.jms_simple.JMSSimpleService0009; +import org.apache.cxf.jms_simple.JMSSimpleService0010; +import org.apache.cxf.jms_simple.JMSSimpleService0011; +import org.apache.cxf.jms_simple.JMSSimpleService0012; +import org.apache.cxf.jms_simple.JMSSimpleService1001; +import org.apache.cxf.systest.jms.EmbeddedJMSBrokerLauncher; +import org.apache.cxf.testsuite.testcase.TestCaseType; +import org.apache.cxf.transport.jms.JMSConstants; +import org.apache.cxf.transport.jms.JMSMessageHeadersType; + +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * + */ +public class SOAPJMSTestSuiteTest extends AbstractSOAPJMSTestSuite { + + @BeforeClass + public static void startServers() throws Exception { + Map props = new HashMap(); + if (System.getProperty("activemq.store.dir") != null) { + props.put("activemq.store.dir", System.getProperty("activemq.store.dir")); + } + 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)); + } + + private void oneWayTest(TestCaseType testcase, JMSSimplePortType port) throws Exception { + InvocationHandler handler = Proxy.getInvocationHandler(port); + BindingProvider bp = (BindingProvider)handler; + + Map requestContext = bp.getRequestContext(); + JMSMessageHeadersType requestHeader = new JMSMessageHeadersType(); + requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader); + Exception e = null; + try { + port.ping("test"); + } catch (Exception e1) { + e = e1; + } + checkJMSProperties(testcase, requestHeader); + if (e != null) { + throw e; + } + } + + private void twoWayTest(TestCaseType testcase, final JMSSimplePortType port) + throws Exception { + JMSMessageHeadersType requestHeader = new JMSMessageHeadersType(); + twoWayTestWithRequestHeader(testcase, port, requestHeader); + } + + private void twoWayTestWithRequestHeader(TestCaseType testcase, final JMSSimplePortType port, + JMSMessageHeadersType requestHeader) + throws Exception { + InvocationHandler handler = Proxy.getInvocationHandler(port); + BindingProvider bp = (BindingProvider)handler; + + Map requestContext = bp.getRequestContext(); + if (requestHeader == null) { + requestHeader = new JMSMessageHeadersType(); + } + requestContext.put(JMSConstants.JMS_CLIENT_REQUEST_HEADERS, requestHeader); + Exception e = null; + try { + String response = port.echo("test"); + assertEquals(response, "test"); + } catch (Exception e1) { + e = e1; + } + Map responseContext = bp.getResponseContext(); + JMSMessageHeadersType responseHeader = (JMSMessageHeadersType)responseContext + .get(JMSConstants.JMS_CLIENT_RESPONSE_HEADERS); + checkJMSProperties(testcase, requestHeader, responseHeader); + if (e != null) { + throw e; + } + } + + @Test + public void test0001() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0001"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0001", "SimplePort", + JMSSimpleService0001.class, + JMSSimplePortType.class); + oneWayTest(testcase, simplePort); + } + + @Test + public void test0002() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0002"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0001", "SimplePort", + JMSSimpleService0001.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0003() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0003"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0003", "SimplePort", + JMSSimpleService0003.class, + JMSSimplePortType.class); + oneWayTest(testcase, simplePort); + } + + @Test + public void test0004() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0004"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0003", "SimplePort", + JMSSimpleService0003.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0005() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0005"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0005", "SimplePort", + JMSSimpleService0005.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0006() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0006"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0006", "SimplePort", + JMSSimpleService0006.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0008() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0008"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0008", "SimplePort", + JMSSimpleService0008.class, + JMSSimplePortType.class); + + JMSMessageHeadersType requestHeader = new JMSMessageHeadersType(); + requestHeader.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT); + requestHeader.setTimeToLive(14400000); + requestHeader.setJMSPriority(8); + requestHeader.setJMSReplyTo("dynamicQueues/replyqueue0008"); + + twoWayTestWithRequestHeader(testcase, simplePort, requestHeader); + } + + @Test + public void test0009() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0009"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0009", "SimplePort", + JMSSimpleService0009.class, + JMSSimplePortType.class); + + JMSMessageHeadersType requestHeader = new JMSMessageHeadersType(); + requestHeader.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT); + requestHeader.setTimeToLive(10800000); + requestHeader.setJMSPriority(3); + requestHeader.setJMSReplyTo("dynamicQueues/replyqueue00093"); + + twoWayTestWithRequestHeader(testcase, simplePort, requestHeader); + } + + @Test + public void test0010() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0010"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0010", "SimplePort", + JMSSimpleService0010.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0011() throws Exception { + TestCaseType testcase = JMSTestUtil.getTestCase("test0011"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0011", "SimplePort", + JMSSimpleService0011.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test0012() throws Exception { + // same to test0002 + TestCaseType testcase = JMSTestUtil.getTestCase("test0012"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService0012", "SimplePort", + JMSSimpleService0012.class, + JMSSimplePortType.class); + twoWayTest(testcase, simplePort); + } + + @Test + public void test1001() throws Exception { + // same to test0002 + TestCaseType testcase = JMSTestUtil.getTestCase("test1001"); + final JMSSimplePortType simplePort = getPort("JMSSimpleService1001", "SimplePort", + JMSSimpleService1001.class, + JMSSimplePortType.class); + + JMSMessageHeadersType requestHeader = new JMSMessageHeadersType(); + requestHeader.setSOAPJMSBindingVersion("0.3"); + try { + twoWayTestWithRequestHeader(testcase, simplePort, requestHeader); + } catch (Exception e) { + assertTrue(e.getMessage().contains("Unrecognized BindingVersion")); + } + } +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/testcases/SOAPJMSTestSuiteTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,172 @@ +/** + * 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.jms.testsuite.util; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import javax.jms.DeliveryMode; +import javax.jms.Destination; +import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.Session; +import javax.jms.TextMessage; +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.Unmarshaller; + +import org.apache.cxf.testsuite.testcase.TestCaseType; +import org.apache.cxf.testsuite.testcase.TestCasesType; +import org.apache.cxf.transport.jms.JMSConfiguration; +import org.apache.cxf.transport.jms.JMSFactory; +import org.apache.cxf.transport.jms.JMSOldConfigHolder; +import org.apache.cxf.transport.jms.JNDIConfiguration; +import org.apache.cxf.transport.jms.uri.JMSEndpoint; +import org.apache.cxf.transport.jms.uri.JMSEndpointParser; +import org.apache.cxf.transport.jms.uri.JMSURIConstants; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.jms.core.MessageCreator; +import org.springframework.jms.support.destination.JndiDestinationResolver; +import org.springframework.jndi.JndiTemplate; + +/** + * + */ +public final class JMSTestUtil { + + private static TestCasesType testcases; + + private JMSTestUtil() { + } + + public static void createSession(String address) throws Exception { + JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(address); + try { + JmsTemplate jmsTemplate = JMSFactory + .createJmsTemplate(getInitJMSConfiguration(address), null); + Destination dest = JMSFactory.resolveOrCreateDestination(jmsTemplate, endpoint + .getDestinationName(), false); + jmsTemplate.send(dest, new MessageCreator() { + public Message createMessage(Session session) throws JMSException { + TextMessage message = session.createTextMessage(); + message.setText("This is message " + 1); + return message; + } + }); + } catch (JMSException e) { + System.out.println("Exception occurred: " + e.toString()); + } + } + + public static List getTestCases() { + try { + if (testcases == null) { + loadTestCases(); + } + return testcases.getTestCase(); + } catch (Exception e) { + e.printStackTrace(); + } + return new ArrayList(); + } + + public static TestCaseType getTestCase(String testId) { + if (testId == null) { + return null; + } + Iterator iter = getTestCases().iterator(); + while (iter.hasNext()) { + TestCaseType testcase = iter.next(); + if (testId.equals(testcase.getId())) { + return testcase; + } + } + return null; + } + + private static void loadTestCases() throws Exception { + JAXBContext context = JAXBContext.newInstance("org.apache.cxf.testsuite.testcase"); + Unmarshaller unmarshaller = context.createUnmarshaller(); + JAXBElement e = (JAXBElement)unmarshaller.unmarshal(new JMSTestUtil().getClass() + .getResource("/org/apache/cxf/jms/testsuite/util/testcases.xml")); + testcases = (TestCasesType)e.getValue(); + } + + public static JmsTemplate getJmsTemplate(String address) throws Exception { + return JMSFactory.createJmsTemplate(getInitJMSConfiguration(address), null); + } + + public static Destination getJmsDestination(JmsTemplate jmsTemplate, String destinationName, + boolean pubSubDomain) { + return JMSFactory.resolveOrCreateDestination(jmsTemplate, destinationName, pubSubDomain); + } + + private static JMSConfiguration getInitJMSConfiguration(String address) throws Exception { + JMSEndpoint endpoint = JMSEndpointParser.createEndpoint(address); + + JMSConfiguration jmsConfig = new JMSConfiguration(); + + if (endpoint.isSetDeliveryMode()) { + int deliveryMode = endpoint.getDeliveryMode() + .equals(JMSURIConstants.DELIVERYMODE_PERSISTENT) + ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; + jmsConfig.setDeliveryMode(deliveryMode); + } + + if (endpoint.isSetPriority()) { + int priority = endpoint.getPriority(); + jmsConfig.setPriority(priority); + } + + if (endpoint.isSetTimeToLive()) { + long timeToLive = endpoint.getTimeToLive(); + jmsConfig.setTimeToLive(timeToLive); + } + + if (jmsConfig.isUsingEndpointInfo()) { + JndiTemplate jt = new JndiTemplate(); + jt.setEnvironment(JMSOldConfigHolder.getInitialContextEnv(endpoint)); + boolean pubSubDomain = false; + pubSubDomain = endpoint.getJmsVariant().equals(JMSURIConstants.TOPIC); + JNDIConfiguration jndiConfig = new JNDIConfiguration(); + jndiConfig.setJndiConnectionFactoryName(endpoint.getJndiConnectionFactoryName()); + jmsConfig.setJndiTemplate(jt); + jmsConfig.setJndiConfig(jndiConfig); + jmsConfig.setExplicitQosEnabled(true); + jmsConfig.setPubSubDomain(pubSubDomain); + jmsConfig.setPubSubNoLocal(true); + boolean useJndi = endpoint.getJmsVariant().equals(JMSURIConstants.JNDI); + if (useJndi) { + // Setup Destination jndi destination resolver + final JndiDestinationResolver jndiDestinationResolver = new JndiDestinationResolver(); + jndiDestinationResolver.setJndiTemplate(jt); + jmsConfig.setDestinationResolver(jndiDestinationResolver); + jmsConfig.setTargetDestination(endpoint.getDestinationName()); + jmsConfig.setReplyDestination(endpoint.getReplyToName()); + } else { + // Use the default dynamic destination resolver + jmsConfig.setTargetDestination(endpoint.getDestinationName()); + jmsConfig.setReplyDestination(endpoint.getReplyToName()); + } + } + return jmsConfig; + } +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/JMSTestUtil.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml Thu Jul 30 10:52:56 2009 @@ -0,0 +1,269 @@ + + + + +
jms:jndi:dynamicQueues/testqueue0001?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + byte + 2 + 4 + 0 + + + queue://testqueue0001 + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0001 + + + +
+ + +
jms:jndi:dynamicQueues/testqueue0001?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + byte + 2 + 4 + 0 + + + queue://testqueue0001 + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0001 + + + + + byte + 2 + 4 + 0 + + + + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0001 + + +
+ + +
jms:jndi:dynamicQueues/testqueue0003?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + text + 2 + 4 + 0 + + + queue://testqueue0003 + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0003 + + + +
+ + +
jms:jndi:dynamicQueues/testqueue0003?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + text + 2 + 4 + 0 + + + queue://testqueue0003 + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0003 + + + + + text + 2 + 4 + 0 + + + + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue0003 + + +
+ + +
jms:jndi:dynamicQueues/testqueue0005?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500&targetService=EchoPort&deliveryMode=NON_PERSISTENT&timeToLive=3600000&priority=5&replyToName=dynamicQueues/replyqueue0005
+ + 1 + 5 + 0 + queue://replyqueue0005 + queue://testqueue0005 + + + queue://replyqueue0005 + +
+ + +
jms:jndi:dynamicQueues/testqueue0006?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + 1 + 6 + 0 + queue://replyqueue0006 + queue://testqueue0006 + + + queue://replyqueue0006 + +
+ + +
jms:jndi:dynamicQueues/testqueue0008?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + 1 + 8 + 0 + queue://replyqueue0008 + queue://testqueue0008 + + + queue://replyqueue0008 + +
+ + +
jms:jndi:dynamicQueues/testqueue0009?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500&targetService=EchoPort&deliveryMode=PERSISTENT&timeToLive=3600000&priority=1&replyToName=dynamicQueues/replyqueue00091
+ + 1 + 3 + 0 + queue://replyqueue00093 + queue://testqueue0009 + + + queue://replyqueue00093 + +
+ + +
jms:jndi:dynamicQueues/testqueue0010?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500&deliveryMode=PERSISTENT&timeToLive=3600000&priority=1&replyToName=dynamicQueues/replyqueue00101
+ + 2 + 1 + 0 + queue://replyqueue00101 + queue://testqueue0010 + + + queue://replyqueue00101 + +
+ + +
jms:jndi:dynamicQueues/testqueue0011?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500&deliveryMode=PERSISTENT&timeToLive=3600000&priority=1&replyToName=dynamicQueues/replyqueue00111&deliveryMode=NON_PERSISTENT&timeToLive=7200000&priority=2&replyToName=dynamicQueues/replyqueue00112
+ + 1 + 2 + 0 + queue://replyqueue00112 + queue://testqueue0011 + + + queue://replyqueue00112 + +
+ + +
jms:jndi:dynamicQueues/testqueue0012?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + 2 + 4 + 0 + queue://testqueue0001 + + + queue://replyqueue0001 + +
+ + +
jms:jndi:dynamicQueues/testqueue1001?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61500
+ + byte + 2 + 4 + 0 + + + queue://testqueue1001 + false + 0.3 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue1001 + + + + + byte + 2 + 4 + 0 + + + + false + 1.0 + + text/xml; charset=UTF-8 + + jms:jndi:dynamicQueues/testqueue1001 + true + + +
+
\ No newline at end of file Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/jms/testsuite/util/testcases.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,32 @@ +/** + * 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; + +import javax.jws.WebService; + + + +@WebService(serviceName = "HelloWorldServiceAppCorrelationID", + portName = "HelloWorldPortAppCorrelationIDEng", + endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType", + targetNamespace = "http://cxf.apache.org/hello_world_jms", + wsdlLocation = "testutils/jms_test.wsdl") +public class GreeterImplTwoWayJMSAppCorrelationIDEng extends TwoWayJMSImplBase { + +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDEng.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java (added) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java Thu Jul 30 10:52:56 2009 @@ -0,0 +1,32 @@ +/** + * 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; + +import javax.jws.WebService; + + + +@WebService(serviceName = "HelloWorldServiceAppCorrelationID", + portName = "HelloWorldPortAppCorrelationIDSales", + endpointInterface = "org.apache.cxf.hello_world_jms.HelloWorldPortType", + targetNamespace = "http://cxf.apache.org/hello_world_jms", + wsdlLocation = "testutils/jms_test.wsdl") +public class GreeterImplTwoWayJMSAppCorrelationIDSales extends TwoWayJMSImplBase { + +} Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMSAppCorrelationIDSales.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java?rev=799234&r1=799233&r2=799234&view=diff ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java (original) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/JMSClientServerTest.java Thu Jul 30 10:52:56 2009 @@ -18,13 +18,13 @@ */ package org.apache.cxf.systest.jms; +import java.lang.Thread.State; import java.lang.reflect.UndeclaredThrowableException; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; -import java.util.UUID; import javax.activation.DataHandler; import javax.jms.DeliveryMode; @@ -48,6 +48,7 @@ import org.apache.cxf.hello_world_jms.HelloWorldPubSubService; import org.apache.cxf.hello_world_jms.HelloWorldQueueDecoupledOneWaysService; import org.apache.cxf.hello_world_jms.HelloWorldService; +import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationID; import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDNoPrefix; import org.apache.cxf.hello_world_jms.HelloWorldServiceAppCorrelationIDStaticPrefix; import org.apache.cxf.hello_world_jms.HelloWorldServiceRuntimeCorrelationIDDynamicPrefix; @@ -586,20 +587,21 @@ } } } + @Test - public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Exception { + public void testTwoWayQueueAppCorrelationID() throws Exception { QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", - "HelloWorldServiceAppCorrelationIDStaticPrefix")); + "HelloWorldServiceAppCorrelationID")); QName portNameEng = getPortName(new QName("http://cxf.apache.org/hello_world_jms", - "HelloWorldPortAppCorrelationIDStaticPrefixEng")); + "HelloWorldPortAppCorrelationIDEng")); QName portNameSales = getPortName(new QName("http://cxf.apache.org/hello_world_jms", - "HelloWorldPortAppCorrelationIDStaticPrefixSales")); + "HelloWorldPortAppCorrelationIDSales")); URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl"); assertNotNull(wsdl); - HelloWorldServiceAppCorrelationIDStaticPrefix service = - new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl, serviceName); + HelloWorldServiceAppCorrelationID service = + new HelloWorldServiceAppCorrelationID(wsdl, serviceName); assertNotNull(service); ClientRunnable engClient = @@ -627,6 +629,52 @@ } for (Thread t : threads) { + t.join(5000); + } + + Throwable e = (engClient.getException() != null) + ? engClient.getException() + : (salesClient.getException() != null) + ? salesClient.getException() : null; + + if (e != null) { + StringBuffer message = new StringBuffer(); + for (StackTraceElement ste : e.getStackTrace()) { + message.append(ste.toString() + System.getProperty("line.separator")); + } + fail(message.toString()); + } + } + + @Test + public void testTwoWayQueueAppCorrelationIDStaticPrefix() throws Exception { + QName serviceName = getServiceName(new QName("http://cxf.apache.org/hello_world_jms", + "HelloWorldServiceAppCorrelationIDStaticPrefix")); + QName portNameEng = getPortName(new QName("http://cxf.apache.org/hello_world_jms", + "HelloWorldPortAppCorrelationIDStaticPrefixEng")); + QName portNameSales = getPortName(new QName("http://cxf.apache.org/hello_world_jms", + "HelloWorldPortAppCorrelationIDStaticPrefixSales")); + + URL wsdl = getClass().getResource("/wsdl/jms_test.wsdl"); + assertNotNull(wsdl); + + HelloWorldServiceAppCorrelationIDStaticPrefix service = + new HelloWorldServiceAppCorrelationIDStaticPrefix(wsdl, serviceName); + assertNotNull(service); + + ClientRunnable engClient = + new ClientRunnable(service.getPort(portNameEng, HelloWorldPortType.class)); + + ClientRunnable salesClient = + new ClientRunnable(service.getPort(portNameSales, HelloWorldPortType.class)); + + Thread[] threads = new Thread[] {new Thread(engClient), new Thread(salesClient)}; + + for (Thread t : threads) { + t.start(); + } + + for (Thread t : threads) { t.join(10000); } @@ -670,26 +718,32 @@ HelloWorldPortType port = service.getPort(portName, HelloWorldPortType.class); - for (int i = 0; i < 10; ++i) { - ClientRunnable client = - new ClientRunnable(port, - new CorrelationIDFactory() { - public String createCorrealtionID() { - return UUID.randomUUID().toString(); - } - }); - + for (int i = 0; i < 1; ++i) { + ClientRunnable client = new ClientRunnable(port); Thread thread = new Thread(client); threads.add(thread); clients.add(client); thread.start(); } + for (Thread t : threads) { + t.join(5000); + assertTrue("Not terminated state: " + t.getState(), t.getState() == State.TERMINATED); + } + + for (ClientRunnable client : clients) { + if (client.getException() != null + && client.getException().getMessage().contains("Timeout")) { + fail(client.getException().getMessage()); + } + } + /* + * The result is not certain. sometimes right, sometime wrong. because the thread. //Sleep for up to 10 seconds. The timeout should be at 5 seconds so this //should bail earlier for (int x = 0; x < 10; x++) { Thread.sleep(1000); - + for (ClientRunnable client : clients) { if (client.getException() != null && client.getException().getMessage().contains("Timeout")) { @@ -703,6 +757,7 @@ + " has been added to the runtime or an unexpected exception received. " + " If latter is true, then read method comments for details on missing QoS" + " and change this test to fail on exception"); + */ } /* @@ -754,7 +809,7 @@ HelloWorldPortType portEng = service.getPort(portNameEng, HelloWorldPortType.class); HelloWorldPortType portSales = service.getPort(portNameSales, HelloWorldPortType.class); - for (int i = 0; i < 5; ++i) { + for (int i = 0; i < 10; ++i) { ClientRunnable client = new ClientRunnable(portEng, "com.mycompany.eng:"); Thread thread = new Thread(client); threads.add(thread); @@ -766,12 +821,11 @@ clients.add(client); thread.start(); } - + for (Thread t : threads) { t.join(10000); } - for (ClientRunnable client : clients) { if (client.getException() != null && client.getException().getMessage().contains("Timeout")) { @@ -801,8 +855,7 @@ HelloWorldPortType port = service.getPort(portName, HelloWorldPortType.class); for (int i = 0; i < 10; ++i) { - ClientRunnable client = - new ClientRunnable(port); + ClientRunnable client = new ClientRunnable(port); Thread thread = new Thread(client); threads.add(thread); Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java?rev=799234&r1=799233&r2=799234&view=diff ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java (original) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/Server.java Thu Jul 30 10:52:56 2009 @@ -46,6 +46,8 @@ Object i4 = new GreeterImplTwoWayJMSRuntimeCorrelationIDDynamicPrefix(); Object i5 = new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixEng(); Object i6 = new GreeterImplTwoWayJMSRuntimeCorrelationIDStaticPrefixSales(); + Object i7 = new GreeterImplTwoWayJMSAppCorrelationIDEng(); + Object i8 = new GreeterImplTwoWayJMSAppCorrelationIDSales(); Object mtom = new JMSMTOMImpl(); Endpoint.publish(null, impleDoc); @@ -62,6 +64,8 @@ Endpoint.publish("", i4); Endpoint.publish("", i5); Endpoint.publish("", i6); + Endpoint.publish("", i7); + Endpoint.publish("", i8); EndpointImpl ep = (EndpointImpl)Endpoint.publish("http://cxf.apache.org/transports/jms", mtom); Binding binding = ep.getBinding(); ((SOAPBinding)binding).setMTOMEnabled(true); Added: cxf/trunk/systests/src/test/resources/jms/testcase.xjb URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jms/testcase.xjb?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/resources/jms/testcase.xjb (added) +++ cxf/trunk/systests/src/test/resources/jms/testcase.xjb Thu Jul 30 10:52:56 2009 @@ -0,0 +1,31 @@ + + + + + + + + + + Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xjb ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xjb ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xjb ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: cxf/trunk/systests/src/test/resources/jms/testcase.xsd URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/resources/jms/testcase.xsd?rev=799234&view=auto ============================================================================== --- cxf/trunk/systests/src/test/resources/jms/testcase.xsd (added) +++ cxf/trunk/systests/src/test/resources/jms/testcase.xsd Thu Jul 30 10:52:56 2009 @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xsd ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xsd ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: cxf/trunk/systests/src/test/resources/jms/testcase.xsd ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl?rev=799234&view=auto ============================================================================== --- cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl (added) +++ cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl Thu Jul 30 10:52:56 2009 @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NON_PERSISTENT + 7200000 + 6 + dynamicQueues/replyqueue0006 + + + + + + + + + + + + + + + + + + + + + + + PERSISTENT + 7200000 + 2 + dynamicQueues/replyqueue00092 + + + + + + + + + + + + + + + + + + + + + + + NON_PERSISTENT + 7200000 + 2 + dynamicQueues/replyqueue000102 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Propchange: cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: cxf/trunk/testutils/src/main/resources/wsdl/jms_spec_testsuite.wsdl ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl?rev=799234&r1=799233&r2=799234&view=diff ============================================================================== --- cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl (original) +++ cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl Thu Jul 30 10:52:56 2009 @@ -351,6 +351,27 @@ + + + + + + + + + + + + + + + @@ -380,7 +401,7 @@ + useConduitIdSelector="true"/> + jndiReplyDestinationName="dynamicQueues/test.jmstransport.binary.reply">