From 9a59e9fb42ec4409f5dbf99a5bc67c31ddc0686f Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 23 Apr 2014 16:40:14 +0200 Subject: [PATCH] INT-3383: Update to Smack 4.0.0 The family of Message.(set|get)Properties methods has been factored out of Smack as an extra extension. Use JivePropertiesManager as replacement. It is no longer necessary to supress Smack path warnings. Delete custom smack-config.xml, as all it did was disabling certain (important) SASL mechanisms. Also remove the unit test that verified this. Some unit tests mock ChatManager and Chat for no reason, delete those lines. XMPPConnection.getHost() and .getPort() are only valid after the connection got established, due the fact that those information is often only available after a DNS SRV lookup was performed. Remove the lines in unit tests that verified their value. Remove the truststorePath example in documentation, since Smack 4.0 no longer provides support for providing a custom truststore. Instead ConnectionConfiguration in Smack 4.0 allows to set a custom SSLContext (which then again can provide a TrustManager that uses a custom truststore). --- build.gradle | 14 ++++----- .../ws/config/UriVariableTests.java | 5 ++-- .../config/XmppConnectionFactoryBean.java | 24 ++++++++++++--- .../xmpp/support/DefaultXmppHeaderMapper.java | 13 ++++++--- .../main/resources/META-INF/smack-config.xml | 24 --------------- ...ssageInboundChannelAdapterParserTests.java | 16 ++++------ ...sageOutboundChannelAdapterParserTests.java | 3 +- .../config/XmppConnectionParserTests.java | 21 +------------- .../ChatMessageListeningEndpointTests.java | 14 +++------ .../PresenceListeningEndpointTests.java | 7 ----- .../support/DefaultXmppHeaderMapperTests.java | 29 +++++++++---------- src/reference/docbook/xmpp.xml | 3 +- 12 files changed, 66 insertions(+), 107 deletions(-) delete mode 100644 spring-integration-xmpp/src/main/resources/META-INF/smack-config.xml diff --git a/build.gradle b/build.gradle index 1344f7bbdf2..eeb4dbefdc2 100644 --- a/build.gradle +++ b/build.gradle @@ -106,7 +106,7 @@ subprojects { subproject -> saajImplVersion = '1.3.23' servletApiVersion = '3.1.0' slf4jVersion = "1.7.6" - smackVersion = '3.2.1' + smackVersion = '4.0.0' springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '1.3.4.RELEASE' springDataMongoVersion = '1.5.0.RELEASE' springDataRedisVersion = '1.3.0.RELEASE' @@ -626,8 +626,8 @@ project('spring-integration-ws') { exclude group: 'org.springframework' } testCompile "javax.jms:jms-api:$jmsApiVersion" - testCompile "org.igniterealtime.smack:smack:$smackVersion" - testCompile "org.igniterealtime.smack:smackx:$smackVersion" + testCompile "org.igniterealtime.smack:smack-tcp:$smackVersion" + testCompile "org.igniterealtime.smack:smack-extensions:$smackVersion" testCompile "javax.mail:javax.mail-api:$javaxMailVersion" testRuntime "com.sun.mail:mailapi:$javaxMailVersion" } @@ -657,14 +657,12 @@ project('spring-integration-xmpp') { dependencies { compile project(":spring-integration-core") compile("javax.activation:activation:$javaxActivationVersion", optional) - compile "org.igniterealtime.smack:smack:$smackVersion" - compile "org.igniterealtime.smack:smackx:$smackVersion" + compile "org.igniterealtime.smack:smack-tcp:$smackVersion" + compile "org.igniterealtime.smack:smack-resolver-javax:$smackVersion" + compile "org.igniterealtime.smack:smack-extensions:$smackVersion" compile "org.springframework:spring-context-support:$springVersion" testCompile project(":spring-integration-stream") } - - // suppress smack path warnings - [compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"] } project("spring-integration-bom") { diff --git a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java index 75ddb6b1b2d..a95a09fdc12 100644 --- a/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java +++ b/spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import javax.jms.Session; import org.hamcrest.Matchers; +import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.Packet; import org.junit.Test; @@ -207,7 +208,7 @@ public void testInt2720EmailUriVariables() { } @Test - public void testInt2720XmppUriVariables() { + public void testInt2720XmppUriVariables() throws NotConnectedException { Mockito.doThrow(new WebServiceIOException("intentional")).when(this.xmppConnection).sendPacket(Mockito.any(Packet.class)); diff --git a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/config/XmppConnectionFactoryBean.java b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/config/XmppConnectionFactoryBean.java index 7619262c4a1..c77e67ddb39 100644 --- a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/config/XmppConnectionFactoryBean.java +++ b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/config/XmppConnectionFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,9 @@ import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.ConnectionListener; import org.jivesoftware.smack.Roster; +import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smack.tcp.XMPPTCPConnection; import org.springframework.beans.factory.BeanInitializationException; import org.springframework.beans.factory.config.AbstractFactoryBean; import org.springframework.context.SmartLifecycle; @@ -92,7 +94,7 @@ public Class getObjectType() { @Override protected XMPPConnection createInstance() throws Exception { - this.connection = new XMPPConnection(this.connectionConfiguration); + this.connection = new XMPPTCPConnection(this.connectionConfiguration); return this.connection; } @@ -118,7 +120,7 @@ public void start() { this.running = true; } catch (Exception e) { - throw new BeanInitializationException("failed to connect to " + this.connectionConfiguration.getHost(), e); + throw new BeanInitializationException("failed to connect to XMPP service for " + this.connectionConfiguration.getServiceName(), e); } } } @@ -126,7 +128,11 @@ public void start() { public void stop() { synchronized (this.lifecycleMonitor) { if (this.isRunning()) { - this.connection.disconnect(); + try { + this.connection.disconnect(); + } catch (NotConnectedException e) { + // Ignore + } this.running = false; } } @@ -171,6 +177,16 @@ public void connectionClosedOnError(Exception e) { public void connectionClosed() { logger.debug("Connection closed"); } + + @Override + public void connected(XMPPConnection connection) { + logger.debug("Connection connected"); + } + + @Override + public void authenticated(XMPPConnection connection) { + logger.debug("Connection authenticated"); + } } } diff --git a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.java b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.java index 8e43fd786ad..355d714b1eb 100644 --- a/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.java +++ b/spring-integration-xmpp/src/main/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapper.java @@ -22,7 +22,8 @@ import java.util.Map; import org.jivesoftware.smack.packet.Message; - +import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager; +import org.jivesoftware.smackx.jiveproperties.packet.JivePropertiesExtension; import org.springframework.integration.mapping.AbstractHeaderMapper; import org.springframework.integration.xmpp.XmppHeaders; import org.springframework.util.StringUtils; @@ -86,8 +87,12 @@ protected Map extractStandardHeaders(Message source) { @Override protected Map extractUserDefinedHeaders(Message source) { Map headers = new HashMap(); - for (String propertyName : source.getPropertyNames()) { - headers.put(propertyName, source.getProperty(propertyName)); + JivePropertiesExtension jpe = (JivePropertiesExtension) source.getExtension(JivePropertiesExtension.NAMESPACE); + if (jpe == null) { + return headers; + } + for (String propertyName : jpe.getPropertyNames()) { + headers.put(propertyName, JivePropertiesManager.getProperty(source, propertyName)); } return headers; } @@ -129,7 +134,7 @@ protected void populateStandardHeaders(Map headers, Message targ @Override protected void populateUserDefinedHeader(String headerName, Object headerValue, Message target) { - target.setProperty(headerName, headerValue); + JivePropertiesManager.addProperty(target, headerName, headerValue); } @Override diff --git a/spring-integration-xmpp/src/main/resources/META-INF/smack-config.xml b/spring-integration-xmpp/src/main/resources/META-INF/smack-config.xml deleted file mode 100644 index 09b7da5422c..00000000000 --- a/spring-integration-xmpp/src/main/resources/META-INF/smack-config.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - org.jivesoftware.smackx.ServiceDiscoveryManager - org.jivesoftware.smack.PrivacyListManager - org.jivesoftware.smackx.XHTMLManager - org.jivesoftware.smackx.muc.MultiUserChat - org.jivesoftware.smackx.filetransfer.FileTransferManager - org.jivesoftware.smackx.LastActivityManager - org.jivesoftware.smack.ReconnectionManager - org.jivesoftware.smackx.commands.AdHocCommandManager - - - - 5000 - - - 30000 - - PLAIN - \ No newline at end of file diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageInboundChannelAdapterParserTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageInboundChannelAdapterParserTests.java index 8e1f852d525..bc838cda953 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageInboundChannelAdapterParserTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageInboundChannelAdapterParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,11 +22,11 @@ import java.lang.reflect.Field; -import org.jivesoftware.smack.Chat; -import org.jivesoftware.smack.ChatManager; import org.jivesoftware.smack.PacketListener; +import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.packet.Message; +import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -78,12 +78,8 @@ public void testInboundAdapter(){ } @Test - public void testInboundAdapterUsageWithHeaderMapper() { + public void testInboundAdapterUsageWithHeaderMapper() throws NotConnectedException { XMPPConnection xmppConnection = Mockito.mock(XMPPConnection.class); - ChatManager chatManager = Mockito.mock(ChatManager.class); - Mockito.when(xmppConnection.getChatManager()).thenReturn(chatManager); - Chat chat = Mockito.mock(Chat.class); - Mockito.when(chatManager.getThreadChat(Mockito.any(String.class))).thenReturn(chat); ChatMessageListeningEndpoint adapter = context.getBean("xmppInboundAdapter", ChatMessageListeningEndpoint.class); @@ -96,8 +92,8 @@ public void testInboundAdapterUsageWithHeaderMapper() { Message message = new Message(); message.setBody("hello"); message.setTo("oleg"); - message.setProperty("foo", "foo"); - message.setProperty("bar", "bar"); + JivePropertiesManager.addProperty(message, "foo", "foo"); + JivePropertiesManager.addProperty(message, "bar", "bar"); packetListener.processPacket(message); org.springframework.messaging.Message siMessage = xmppInbound.receive(0); assertEquals("foo", siMessage.getHeaders().get("foo")); diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java index 7facc683b5e..0f433362bdf 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java @@ -24,6 +24,7 @@ import java.util.List; import org.jivesoftware.smack.XMPPConnection; +import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; @@ -117,7 +118,7 @@ public Object answer(InvocationOnMock invocation) { Object[] args = invocation.getArguments(); org.jivesoftware.smack.packet.Message xmppMessage = (org.jivesoftware.smack.packet.Message) args[0]; assertEquals("oleg", xmppMessage.getTo()); - assertEquals("foobar", xmppMessage.getProperty("foobar")); + assertEquals("foobar", JivePropertiesManager.getProperty(xmppMessage, "foobar")); return null; }}) .when(connection).sendPacket(Mockito.any(org.jivesoftware.smack.packet.Message.class)); diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java index 7f474f4fbdd..2248fdc411c 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/XmppConnectionParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,9 +21,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNull; -import java.util.List; - -import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.junit.Test; import org.springframework.context.ApplicationContext; @@ -37,25 +34,11 @@ */ public class XmppConnectionParserTests { - @Test - public void testSmackSasl() { - /* - * Possible SASL mechanisms - * EXTERNAL, GSSAPI, DIGEST-MD5, CRAM-MD5, PLAIN, ANONYMOUS - */ - // values are set in META-INF/smack-config.xml - List saslMechNames = SmackConfiguration.getSaslMechs(); - assertEquals(2, saslMechNames.size()); - assertEquals("PLAIN", saslMechNames.get(0)); - } - @Test public void testSimpleConfiguration() { ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionParserTests-simple.xml", this.getClass()); XMPPConnection connection = ac.getBean("connection", XMPPConnection.class); assertEquals("localhost", connection.getServiceName()); - assertEquals("localhost", connection.getHost()); - assertEquals(5222, connection.getPort()); assertFalse(connection.isConnected()); XmppConnectionFactoryBean xmppFb = ac.getBean("&connection", XmppConnectionFactoryBean.class); assertEquals("happy.user", TestUtils.getPropertyValue(xmppFb, "user")); @@ -78,8 +61,6 @@ public void testCompleteConfiguration() { ApplicationContext ac = new ClassPathXmlApplicationContext("XmppConnectionParserTests-complete.xml", this.getClass()); XMPPConnection connection = ac.getBean("connection", XMPPConnection.class); assertEquals("foogle.com", connection.getServiceName()); - assertEquals("localhost", connection.getHost()); - assertEquals(6222, connection.getPort()); assertFalse(connection.isConnected()); XmppConnectionFactoryBean xmppFb = ac.getBean("&connection", XmppConnectionFactoryBean.class); assertEquals("happy.user", TestUtils.getPropertyValue(xmppFb, "user")); diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/ChatMessageListeningEndpointTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/ChatMessageListeningEndpointTests.java index 293b398cc36..b0329dbb411 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/ChatMessageListeningEndpointTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/ChatMessageListeningEndpointTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,18 +19,17 @@ import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; import java.util.HashSet; import java.util.Set; -import org.jivesoftware.smack.Chat; -import org.jivesoftware.smack.ChatManager; import org.jivesoftware.smack.PacketListener; +import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Message; import org.junit.Test; + import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; @@ -114,16 +113,11 @@ public void testNoXmppConnection(){ } @Test - public void testWithErrorChannel(){ + public void testWithErrorChannel() throws NotConnectedException{ DefaultListableBeanFactory bf = new DefaultListableBeanFactory(); XMPPConnection connection = mock(XMPPConnection.class); bf.registerSingleton(XmppContextUtils.XMPP_CONNECTION_BEAN_NAME, connection); - ChatManager cm = mock(ChatManager.class); - when(connection.getChatManager()).thenReturn(cm); - Chat chat = mock(Chat.class); - when(cm.getThreadChat(Mockito.anyString())).thenReturn(chat); - ChatMessageListeningEndpoint endpoint = new ChatMessageListeningEndpoint(); DirectChannel outChannel = new DirectChannel(); diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/PresenceListeningEndpointTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/PresenceListeningEndpointTests.java index d3fe596c74e..4223b2aae8c 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/PresenceListeningEndpointTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/inbound/PresenceListeningEndpointTests.java @@ -25,8 +25,6 @@ import java.util.HashSet; import java.util.Set; -import org.jivesoftware.smack.Chat; -import org.jivesoftware.smack.ChatManager; import org.jivesoftware.smack.Roster; import org.jivesoftware.smack.RosterListener; import org.jivesoftware.smack.XMPPConnection; @@ -138,11 +136,6 @@ public void testWithErrorChannel(){ XMPPConnection connection = mock(XMPPConnection.class); bf.registerSingleton(XmppContextUtils.XMPP_CONNECTION_BEAN_NAME, connection); - ChatManager cm = mock(ChatManager.class); - when(connection.getChatManager()).thenReturn(cm); - Chat chat = mock(Chat.class); - when(cm.getThreadChat(Mockito.anyString())).thenReturn(chat); - PresenceListeningEndpoint endpoint = new PresenceListeningEndpoint(); DirectChannel outChannel = new DirectChannel(); diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapperTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapperTests.java index 4cd1a6201da..c949ce85a81 100644 --- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapperTests.java +++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/support/DefaultXmppHeaderMapperTests.java @@ -23,9 +23,8 @@ import java.util.Map; import org.jivesoftware.smack.packet.Message; - +import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager; import org.junit.Test; - import org.springframework.messaging.MessageHeaders; import org.springframework.integration.xmpp.XmppHeaders; @@ -58,12 +57,12 @@ public void fromHeadersStandardOutbound() { assertEquals(Message.Type.headline, target.getType()); // user-defined headers not included by default - assertNull(target.getProperty("userDefined1")); - assertNull(target.getProperty("userDefined2")); + assertNull(JivePropertiesManager.getProperty(target, "userDefined1")); + assertNull(JivePropertiesManager.getProperty(target, "userDefined2")); // transient headers should not be copied - assertNull(target.getProperty("id")); - assertNull(target.getProperty("timestamp")); + assertNull(JivePropertiesManager.getProperty(target, "id")); + assertNull(JivePropertiesManager.getProperty(target, "timestamp")); } @Test @@ -91,15 +90,15 @@ public void fromHeadersUserDefinedOnly() { assertEquals(Message.Type.normal, target.getType()); // user-defined headers are included if in the list - assertEquals("foo", target.getProperty("userDefined1")); - assertEquals("bar", target.getProperty("userDefined2")); + assertEquals("foo", JivePropertiesManager.getProperty(target, "userDefined1")); + assertEquals("bar", JivePropertiesManager.getProperty(target, "userDefined2")); // user-defined headers are not included if not in the list - assertNull(target.getProperty("userDefined3")); + assertNull(JivePropertiesManager.getProperty(target, "userDefined3")); // transient headers should not be copied - assertNull(target.getProperty("id")); - assertNull(target.getProperty("timestamp")); + assertNull(JivePropertiesManager.getProperty(target, "id")); + assertNull(JivePropertiesManager.getProperty(target, "timestamp")); } @Test @@ -109,8 +108,8 @@ public void toHeadersStandardOnly() { source.setFrom("test.from"); source.setSubject("test.subject"); source.setThread("test.thread"); - source.setProperty("userDefined1", "foo"); - source.setProperty("userDefined2", "bar"); + JivePropertiesManager.addProperty(source, "userDefined1", "foo"); + JivePropertiesManager.addProperty(source, "userDefined2", "bar"); Map headers = mapper.toHeadersFromRequest(source); assertEquals("test.to", headers.get(XmppHeaders.TO)); assertEquals("test.from", headers.get(XmppHeaders.FROM)); @@ -129,8 +128,8 @@ public void toHeadersUserDefinedOnly() { source.setFrom("test.from"); source.setSubject("test.subject"); source.setThread("test.thread"); - source.setProperty("userDefined1", "foo"); - source.setProperty("userDefined2", "bar"); + JivePropertiesManager.addProperty(source, "userDefined1", "foo"); + JivePropertiesManager.addProperty(source, "userDefined2", "bar"); Map headers = mapper.toHeadersFromReply(source); assertNull(headers.get(XmppHeaders.TO)); assertNull(headers.get(XmppHeaders.FROM)); diff --git a/src/reference/docbook/xmpp.xml b/src/reference/docbook/xmpp.xml index d3b81566035..a8d196e6181 100644 --- a/src/reference/docbook/xmpp.xml +++ b/src/reference/docbook/xmpp.xml @@ -205,7 +205,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp Advanced Configuration - Since Spring Integration XMPP support is based on the Smack 3.1 API (http://www.igniterealtime.org/downloads/index.jsp), it is important + Since Spring Integration XMPP support is based on the Smack 4.0 API (http://www.igniterealtime.org/projects/smack/), it is important to know a few details related to more complex configuration of the XMPP Connection object. @@ -221,7 +221,6 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp -