cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergei Danilov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3590) Exception when setPrettyLogging(true) for LoggingInInterceptor (or LoggingOutInterceptor)
Date Tue, 14 Jun 2011 15:59:47 GMT
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
            Priority: Minor


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

        

Mime
View raw message