Skip to content

Commit c73d3df

Browse files
committed
Improved logging.
1 parent 14eab13 commit c73d3df

File tree

3 files changed

+10
-26
lines changed

3 files changed

+10
-26
lines changed

core/src/main/java/org/springframework/ws/client/support/WebServiceAccessor.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import java.io.IOException;
2020
import java.net.URI;
21+
import java.net.URISyntaxException;
2122

2223
import org.springframework.beans.factory.InitializingBean;
2324
import org.springframework.util.Assert;
@@ -103,10 +104,16 @@ protected WebServiceConnection createConnection(URI uri) throws IOException {
103104
WebServiceMessageSender[] messageSenders = getMessageSenders();
104105
for (int i = 0; i < messageSenders.length; i++) {
105106
if (messageSenders[i].supports(uri)) {
107+
WebServiceConnection connection = messageSenders[i].createConnection(uri);
106108
if (logger.isDebugEnabled()) {
107-
logger.debug("Opening connection to [" + uri + "] using [" + messageSenders[i] + "]");
109+
try {
110+
logger.debug("Opening [" + connection + "] to [" + connection.getUri() + "]");
111+
}
112+
catch (URISyntaxException e) {
113+
// ignore
114+
}
108115
}
109-
return messageSenders[i].createConnection(uri);
116+
return connection;
110117
}
111118
}
112119
throw new IllegalArgumentException("Could not resolve [" + uri + "] to a WebServiceMessageSender");

core/src/main/java/org/springframework/ws/transport/support/WebServiceMessageReceiverObjectSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected final void handleConnection(WebServiceConnection connection, WebServic
111111
private void logUri(WebServiceConnection connection) {
112112
if (logger.isDebugEnabled()) {
113113
try {
114-
logger.debug("Incoming connection [" + connection.getUri() + "]");
114+
logger.debug("Accepting incoming [" + connection + "] to [" + connection.getUri() + "]");
115115
}
116116
catch (URISyntaxException e) {
117117
// ignore

core/src/test/resources/org/springframework/ws/transport/http/WEB-INF/spring-ws-servlet.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)