[
https://issues.apache.org/jira/browse/CXF-3590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Willem Jiang resolved CXF-3590.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.5
2.4.2
2.3.6
Applied patch into trunk, 2.4.x-fixes, and 2.3.x-fixes branch.
> Exception when setPrettyLogging(true) for LoggingInInterceptor (or
> LoggingOutInterceptor)
> -----------------------------------------------------------------------------------------
>
> Key: CXF-3590
> URL: https://issues.apache.org/jira/browse/CXF-3590
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.4.1
> Reporter: Sergei Danilov
> Assignee: Willem Jiang
> Priority: Minor
> Fix For: 2.3.6, 2.4.2, 2.5
>
>
> to reproduce
> create own logging interceptor
> public class PrettyLoggingInInterceptor extends LoggingInInterceptor {
> @Override
> protected void writePayload(StringBuilder builder, CachedOutputStream cos,
> String encoding, String contentType)
> throws Exception {
> setPrettyLogging(true);
> super.writePayload(builder, cos, encoding, contentType);
> }
> }
> 1. add PrettyLoggingInInterceptor to web service
> 2. run client
> 3. javax.wsdl.WSDLException: WSDLException arise because some client request
> have no content (e.g get wsdl)
> workaround
> public class PatchPrettyLoggingInInterceptor extends LoggingInInterceptor {
> @Override
> protected void writePayload(StringBuilder builder, CachedOutputStream cos,
> String encoding, String contentType)
> throws Exception {
> setPrettyLogging(true);
> //patch
> if (cos.size() == 0)
> setPrettyLogging(false);
> super.writePayload(builder, cos, encoding, contentType);
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira