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

Provider<DataSource>.invoke returning non-XML data causes error.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • JAX-WS Runtime
    • None

    Description

      Returning non-XML data in Provider<DataSource>.invoke causes an exception when the ProviderOutDatabindingInterceptor tries to marshall the outgoing data.

      Here's the stack trace:

      Jun 28, 2007 3:13:06 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
      INFO: Interceptor has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Could not parse the XML stream.
      at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:66)
      at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:41)
      at org.apache.cxf.jaxws.interceptors.ProviderOutDatabindingInterceptor.handleMessage(ProviderOutDatabindingInterceptor.java:56)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
      at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:73)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:253)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:213)
      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:54)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
      at org.mortbay.jetty.Server.handle(Server.java:285)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code 45) in prolog; expected '<'
      at [row,col

      {unknown-source}

      ]: [2,1]
      at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623)
      at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
      at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
      at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:284)
      at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:63)
      ... 20 more
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.703 sec <<< FAILURE!

      Attachments

        1. cxf-datasource-test.tgz
          30 kB
          Conrad O'Dea
        2. providerout_datasource_cxf751.patch
          2 kB
          Conrad O'Dea

        Activity

          People

            ffang Freeman Yue Fang
            cjodea Conrad O'Dea
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: