Improved logging.

This commit is contained in:
Arjen Poutsma
2008-02-17 02:29:00 +00:00
parent 14eab13121
commit c73d3df3e1
3 changed files with 10 additions and 26 deletions

View File

@@ -18,6 +18,7 @@ package org.springframework.ws.client.support;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
@@ -103,10 +104,16 @@ public abstract class WebServiceAccessor extends TransformerObjectSupport implem
WebServiceMessageSender[] messageSenders = getMessageSenders();
for (int i = 0; i < messageSenders.length; i++) {
if (messageSenders[i].supports(uri)) {
WebServiceConnection connection = messageSenders[i].createConnection(uri);
if (logger.isDebugEnabled()) {
logger.debug("Opening connection to [" + uri + "] using [" + messageSenders[i] + "]");
try {
logger.debug("Opening [" + connection + "] to [" + connection.getUri() + "]");
}
catch (URISyntaxException e) {
// ignore
}
}
return messageSenders[i].createConnection(uri);
return connection;
}
}
throw new IllegalArgumentException("Could not resolve [" + uri + "] to a WebServiceMessageSender");

View File

@@ -111,7 +111,7 @@ public abstract class WebServiceMessageReceiverObjectSupport implements Initiali
private void logUri(WebServiceConnection connection) {
if (logger.isDebugEnabled()) {
try {
logger.debug("Incoming connection [" + connection.getUri() + "]");
logger.debug("Accepting incoming [" + connection + "] to [" + connection.getUri() + "]");
}
catch (URISyntaxException e) {
// ignore

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="payloadMapping" class="org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping">
<property name="mappings">
<props>
<prop key="http://springframework.org/spring-ws/NoResponse">noResponseEndpoint</prop>
<prop key="http://springframework.org/spring-ws/Response">responseEndpoint</prop>
<prop key="http://springframework.org/spring-ws/Fault">faultEndpoint</prop>
</props>
</property>
</bean>
<bean id="noResponseEndpoint"
class="org.springframework.ws.transport.http.NoResponseEndpoint"/>
<bean id="responseEndpoint"
class="org.springframework.ws.transport.http.ResponseEndpoint"/>
<bean id="faultEndpoint"
class="org.springframework.ws.transport.http.FaultEndpoint"/>
</beans>