cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "aaron pieper (JIRA)" <>
Subject [jira] [Created] (CXF-4475) LoggingInInterceptor throws when pretty printing MTOM messages
Date Tue, 14 Aug 2012 21:52:38 GMT
aaron pieper created CXF-4475:

             Summary: LoggingInInterceptor throws when pretty printing MTOM messages
                 Key: CXF-4475
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.6.1
            Reporter: aaron pieper
            Priority: Minor

I'm using CXF to implement some SOAP web services. I've added a LoggingInInterceptor to my
interceptor chain through an XML configuration file so that incoming SOAP messages will be
logged. My configuration file looks like this:

  <jaxws:endpoint id="foo" implementor="#fooServiceImpl" address="/FOO">
    <!-- snip... -->
      <ref bean="loggingInInterceptor"/>
    <!-- snip... -->
  <bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor">
    <property name="prettyLogging" value="true"/>

This logging setup works OK for non-MTOM messages. But when an incoming message uses MTOM,
I get an error:

org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at net.sf.saxon.event.Sender.sendSAXSource(
        at net.sf.saxon.event.Sender.send(
        at net.sf.saxon.IdentityTransformer.transform(
        at org.apache.cxf.interceptor.AbstractLoggingInterceptor.writePayload(
        at org.apache.cxf.interceptor.LoggingInInterceptor.logging(

The pretty-printing logic in AbstractLoggingInterceptor requires the message to be well-formed
XML, but MTOM messages have various non-XML headers and boundaries. The "content not allowed
in prolog" comes from AbstractLoggingInterceptor trying to parse one of these boundaries as

I've been able to work around this problem by disabling pretty printing.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message