Last active
September 29, 2016 12:21
-
-
Save jonashackt/1897cad1248c442c8a0909a1aebfc1b8 to your computer and use it in GitHub Desktop.
Configure SOAP-Message Logging in Apache CXF JaxWsProxyFactoryBean on Client Side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public WeatherService weatherService() { | |
JaxWsProxyFactoryBean jaxWsFactory = new JaxWsProxyFactoryBean(); | |
jaxWsFactory.setServiceClass(WeatherService.class); | |
jaxWsFactory.setAddress(buildUrl()); | |
LoggingInInterceptor loggingInInterceptor = new LoggingInInterceptor(); | |
loggingInInterceptor.setPrettyLogging(true); | |
LoggingOutInterceptor loggingOutInterceptor = new LoggingOutInterceptor(); | |
loggingOutInterceptor.setPrettyLogging(true); | |
jaxWsFactory.getInInterceptors().add(loggingInInterceptor); | |
jaxWsFactory.getOutInterceptors().add(loggingOutInterceptor); | |
jaxWsFactory.getInFaultInterceptors().add(loggingInInterceptor); | |
jaxWsFactory.getOutFaultInterceptors().add(loggingOutInterceptor); | |
return (WeatherService) jaxWsFactory.create(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment