@Test(expected = SOAPFaultException.class) public void testReplyAndReplyToDestinations() throws Exception { JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setWsdlLocation("classpath:/wsdl/jms_test.wsdl"); factory.setServiceName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldService")); factory.setEndpointName(new QName("http://cxf.apache.org/hello_world_jms", "HelloWorldPort")); factory.setAddress("jms://"); JMSConfigFeature feature = new JMSConfigFeature(); JMSConfiguration config = new JMSConfiguration(); config.setConnectionFactory(new ActiveMQConnectionFactory(broker.getBrokerURL())); config.setRequestURI("test.jmstransport.text"); config.setTargetDestination("test.jmstransport.text"); // replyDestination and replyToDestination intentionally differ in this test scenario // replyDestination = Destination name to listen on for reply messages config.setReplyDestination("test.jmstransport.text.reply"); // replyToDestination = Destination name to send out as replyTo address in the message config.setReplyToDestination("test.jmstransport.text.replyTo"); config.setReceiveTimeout(1000L); feature.setJmsConfig(config); factory.getFeatures().add(feature); HelloWorldPortType greeter = factory.create(HelloWorldPortType.class); try { greeter.greetMe("FooBar"); // Timeout exception should be thrown } finally { ((java.io.Closeable)greeter).close(); } }
jmsConfiguration.setReceiveTimeout(receiveTimeout); jmsConfiguration.setReceiveTimeout(clientReceiveTimeout);
jmsConfig.setDurableSubscriptionClientId(endpoint.getDurableSubscriptionClientId()); jmsConfig.setReceiveTimeout(endpoint.getReceiveTimeout()); jmsConfig.setTimeToLive(endpoint.getTimeToLive()); jmsConfig.setSessionTransacted(endpoint.isSessionTransacted());