See the spring-ws documentation: static.springsource.org/spring-ws/sites/... You can log messages via the standard Commons Logging interface: To log all server-side messages, simply set the org.springframework.ws.server. MessageTracing logger to level DEBUG or TRACE. On the debug level, only the payload root element is logged; on the TRACE level, the entire message content.
If you only want to log sent messages, use the org.springframework.ws.server.MessageTracing. Sent logger; or org.springframework.ws.server.MessageTracing. Received to log received messages.
On the client-side, similar loggers exist: org.springframework.ws.client.MessageTracing. Sent and org.springframework.ws.client.MessageTracing.received.
Was able to figure it out - if you add a ClientInterceptor like this to the WebServicesTemplate interceptors: package com.wuntee. Interceptor; import java.io. ByteArrayOutputStream; import org.apache.
Log4j. Logger; import org.springframework.ws.client. WebServiceClientException; import org.springframework.ws.client.support.interceptor.
ClientInterceptor; import org.springframework.ws.context. MessageContext; public class LoggerInterceptor implements ClientInterceptor { private Logger logger = Logger. GetLogger(this.getClass().getName()); public boolean handleFault(MessageContext context) throws WebServiceClientException { return false; } public boolean handleRequest(MessageContext context) throws WebServiceClientException { logger.Info("handleRequest"); logRequestResponse(context); return true; } public boolean handleResponse(MessageContext context) throws WebServiceClientException { logger.
Info("handleResponse"); logRequestResponse(context); return true; } private void logRequestResponse(MessageContext context){ try{ logger. Info("Request:"); ByteArrayOutputStream out = new ByteArrayOutputStream(); context.getRequest(). WriteTo(out); byte charData = out.toByteArray(); String str = new String(charData, "ISO-8859-1"); logger.
Info(str); } catch(Exception e){ logger. Error("Could not log request: ", e); } if(context.hasResponse()){ try{ logger.Info("Response:"); ByteArrayOutputStream out = new ByteArrayOutputStream(); context.getResponse(). WriteTo(out); byte charData = out.toByteArray(); String str = new String(charData, "ISO-8859-1"); logger.
Info(str); } catch(Exception e){ logger. Error("Could not log response: ", e); } } } }.
The only problem with this solution is if there is a problem unmarshaling the response your handleResponse method will never be called. I have yet to find a solution to work around this issue. – Mike Deck Aug 5 '10 at 16:46.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.