Skip to content

Commit 9935491

Browse files
artembilangaryrussell
authored andcommitted
INT-3985: Upgrade to Spring-WS-2.3.0
JIRA: https://jira.spring.io/browse/INT-3985 Fix a couple typos in the `ws.adoc`
1 parent 13d11e5 commit 9935491

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

build.gradle

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ subprojects { subproject ->
142142
servletApiVersion = '3.1.0'
143143
slf4jVersion = "1.7.21"
144144
tomcatVersion = "8.0.30"
145-
smack3Version = '3.2.1'
146145
smackVersion = '4.1.6'
147146
springAmqpVersion = project.hasProperty('springAmqpVersion') ? project.springAmqpVersion : '1.6.0.BUILD-SNAPSHOT'
148147
// springCloudClusterVersion = '1.0.0.BUILD-SNAPSHOT'
@@ -154,7 +153,7 @@ subprojects { subproject ->
154153
springSocialTwitterVersion = '1.1.1.RELEASE'
155154
springRetryVersion = '1.1.2.RELEASE'
156155
springVersion = project.hasProperty('springVersion') ? project.springVersion : '4.3.0.BUILD-SNAPSHOT'
157-
springWsVersion = '2.2.4.RELEASE'
156+
springWsVersion = '2.3.0.RELEASE'
158157
xmlUnitVersion = '1.6'
159158
xstreamVersion = '1.4.7'
160159
zookeeperVersion = '3.4.7'
@@ -311,7 +310,9 @@ project('spring-integration-core') {
311310
compile "org.springframework:spring-context:$springVersion"
312311
compile "org.springframework:spring-messaging:$springVersion"
313312
compile "org.springframework:spring-tx:$springVersion"
314-
compile "org.springframework.retry:spring-retry:$springRetryVersion"
313+
compile ("org.springframework.retry:spring-retry:$springRetryVersion") {
314+
exclude group: 'org.springframework', module: 'spring-core'
315+
}
315316
// compile ("org.springframework.cloud:spring-cloud-cluster-core:$springCloudClusterVersion", optional)
316317
compile ("io.projectreactor:reactor-stream:$reactorVersion", optional)
317318
compile("com.fasterxml.jackson.core:jackson-databind:$jackson2Version", optional)
@@ -668,12 +669,7 @@ project('spring-integration-ws') {
668669
exclude group: 'org.springframework', module: 'spring-web'
669670
exclude group: 'org.springframework', module: 'spring-webmvc'
670671
}
671-
compile("javax.xml.soap:saaj-api:$saajApiVersion") { dep ->
672-
optional dep
673-
exclude group: 'javax.activation', module: 'activation'
674-
}
675-
compile("com.sun.xml.messaging.saaj:saaj-impl:$saajImplVersion", optional)
676-
compile("javax.activation:activation:$javaxActivationVersion", optional)
672+
677673
testCompile "com.thoughtworks.xstream:xstream:$xstreamVersion"
678674
testCompile ("org.springframework.ws:spring-ws-support:$springWsVersion") {
679675
exclude group: 'org.springframework'
@@ -682,8 +678,9 @@ project('spring-integration-ws') {
682678
exclude group: 'org.springframework'
683679
}
684680
testCompile "javax.jms:jms-api:$jmsApiVersion"
685-
testCompile "org.igniterealtime.smack:smack:$smack3Version"
686-
testCompile "org.igniterealtime.smack:smackx:$smack3Version"
681+
testCompile "org.igniterealtime.smack:smack-tcp:$smackVersion"
682+
testCompile "org.igniterealtime.smack:smack-java7:$smackVersion"
683+
testCompile "org.igniterealtime.smack:smack-extensions:$smackVersion"
687684
testCompile "javax.mail:javax.mail-api:$javaxMailVersion"
688685
testRuntime "com.sun.mail:mailapi:$javaxMailVersion"
689686
}

spring-integration-ws/src/test/java/org/springframework/integration/ws/config/UriVariableTests.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,23 +35,25 @@
3535
import javax.jms.Session;
3636

3737
import org.hamcrest.Matchers;
38+
import org.jivesoftware.smack.SmackException;
3839
import org.jivesoftware.smack.XMPPConnection;
39-
import org.jivesoftware.smack.packet.Packet;
40+
import org.jivesoftware.smack.packet.Stanza;
4041
import org.junit.Test;
4142
import org.junit.runner.RunWith;
4243
import org.mockito.ArgumentCaptor;
4344
import org.mockito.Mockito;
4445
import org.mockito.invocation.InvocationOnMock;
4546
import org.mockito.stubbing.Answer;
47+
4648
import org.springframework.beans.DirectFieldAccessor;
4749
import org.springframework.beans.factory.annotation.Autowired;
4850
import org.springframework.beans.factory.annotation.Qualifier;
49-
import org.springframework.messaging.MessageHandlingException;
5051
import org.springframework.integration.support.MessageBuilder;
5152
import org.springframework.integration.test.util.TestUtils;
5253
import org.springframework.messaging.Message;
5354
import org.springframework.messaging.MessageChannel;
5455
import org.springframework.messaging.MessageHandler;
56+
import org.springframework.messaging.MessageHandlingException;
5557
import org.springframework.test.context.ContextConfiguration;
5658
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
5759
import org.springframework.ws.client.WebServiceClientException;
@@ -208,9 +210,9 @@ public void testInt2720EmailUriVariables() {
208210
}
209211

210212
@Test
211-
public void testInt2720XmppUriVariables() {
213+
public void testInt2720XmppUriVariables() throws SmackException.NotConnectedException {
212214

213-
Mockito.doThrow(new WebServiceIOException("intentional")).when(this.xmppConnection).sendPacket(Mockito.any(Packet.class));
215+
Mockito.doThrow(new WebServiceIOException("intentional")).when(this.xmppConnection).sendStanza(Mockito.any(Stanza.class));
214216

215217
Message<?> message = MessageBuilder.withPayload("<spring/>").setHeader("to", "user").build();
216218
try {
@@ -222,8 +224,8 @@ public void testInt2720XmppUriVariables() {
222224
assertTrue(WebServiceIOException.class.equals(causeType)); // offline
223225
}
224226

225-
ArgumentCaptor<Packet> argument = ArgumentCaptor.forClass(Packet.class);
226-
Mockito.verify(this.xmppConnection).sendPacket(argument.capture());
227+
ArgumentCaptor<Stanza> argument = ArgumentCaptor.forClass(Stanza.class);
228+
Mockito.verify(this.xmppConnection).sendStanza(argument.capture());
227229
assertEquals("[email protected]", argument.getValue().getTo());
228230

229231
assertEquals("xmpp:[email protected]", this.interceptor.getLastUri().toString());

src/reference/asciidoc/ws.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ To configure an outbound Web Service Gateway, use the "outbound-gateway" element
7777
----
7878

7979
NOTE: Notice that this example does not provide a 'reply-channel'.
80-
If the Web Service were to return a non-empty response, the Message containing that response would be sent to the reply channel provided in the request Message's REPLY_CHANNEL header, and if that were not available a channel resolution Exception would be thrown.
80+
If the Web Service were to return a non-empty response, the Message containing that response would be sent to the reply
81+
channel provided in the request Message's `REPLY_CHANNEL` header, and if that were not available a channel resolution Exception would be thrown.
8182
If you want to send the reply to another channel instead, then provide a 'reply-channel' attribute on the 'outbound-gateway' element.
8283

8384
TIP: When invoking a Web Service that returns an empty response after using a String payload for the request Message, _no reply Message will be sent by default_.
@@ -152,7 +153,7 @@ _Controlling URI Encoding_
152153

153154
By default, the URL string is encoded (see http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/UriComponentsBuilder.html[UriComponentsBuilder]) to the URI object before sending the request.
154155
In some scenarios with a non-standard URI it is undesirable to perform the encoding.
155-
Since _version 4.1 _ the `<ws:outbound-gateway/>` provides an `encode-uri` attribute.
156+
Since _version 4.1_ the `<ws:outbound-gateway/>` provides an `encode-uri` attribute.
156157
To disable encoding the URL, this attribute should be set to `false` (by default it is `true`).
157158
If you wish to partially encode some of the URL, this can be achieved using an `expression` within a `<uri-variable/>`:
158159
[source,xml]

0 commit comments

Comments
 (0)