Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7136

soapfault mixed with response

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.7
    • Fix Version/s: Invalid
    • Component/s: JAXB Databinding
    • Environment:

      RHEL Linux, kern 3.10.0-229.1.2.el7.x86_64
      java -version
      java version "1.8.0_102"
      Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

    • Estimated Complexity:
      Unknown

      Description

      we get this fault due to invalid chars attempted to being marshalled (which is obviosly a problem at our shoulders, but - what I see as the bug - is that the Fault XML is intermixed with the response streaming - hence the client is not able to parse the fault as the sudden appering of a soap:fault element inside the expected response payload is not expected:

      application log:

      has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Invalid white space character (0x1) in text to output (in xml 1.1, could output as a character entity)
              at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:154)
              at org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
              at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:254)
              at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
              at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:299)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:218)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:274)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)
      

      from the payload log (using the ext-logger "modern" payload logging mechanism:

      .FAULT_OUT - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>……
      <ns6:name><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Invalid white space character (0x1) in text to output (in xml 1.1, could output as a character entity)</faultstring></soap:Fault></ns6:name></ns2:creditor></ns2:creditorInformation></ns4:creditorInformation></ns4:CreditorSearchResponse></soap:Body></soap:Envelope>
      

      Notice: we have the <ns6:name> element (which is the element causing the illegal char) - and then the fault follows - and then the rest of the element!

      What I'd rather expect is that the service raised an fault - and not any of the contents.

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              davidkarlsen David J. M. Karlsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: