Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-352

Full streaming WebServiceMessage/SoapMessage

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0 RC1
    • Component/s: Core
    • Labels:
      None

      Description

      Currently, WebServiceMessage and its subinterface SoapMessage offer the getSource() and getResult() methods to the contents of the payload. When an endpoint is invoked, the response Source it returns is transormed into the Result of the response message. This transformation has the benefit that the message is always in sync, i.e. the writeTo() method will write the current contents of the message. The downside is that this transformation is rather slow, since a DOM/Axiom tree needs to be built.

      As an alternative, we could do this conversion lazily: if we introduce a setSource(Source) method on the WebServiceMessage (or an sub-interface which extends WebServiceMessage), we could simply set the result of the endpoint on the response message, not creating a DOM tree (yet). Later, when the message is written to the transport stream, we directly transform the set payload Source to the stream, thus saving overhead.

      In a way, this is similar to SWS-302, but has the extra benefit that the payload contents is not kept in a buffer.

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          @Nikkeri

          Not yet, but that will be coming in the RC phase. In the mean time, you can look at the unit tests.

          Show
          arjen.poutsma Arjen Poutsma added a comment - @Nikkeri Not yet, but that will be coming in the RC phase. In the mean time, you can look at the unit tests.
          Hide
          nikkeri Nikkeri2001 added a comment -

          Ok,

          I should be wery close now. For some reason I get stack trace on console and and response on client side contains only soap envelope and empty body.

          Client response looks like this:

          <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
          <soapenv:Body/>
          </soapenv:Envelope>

          If you could check the trace and tell your dependencies that may differ, please.

          Problems seems to start when com.sun.xml.internal.bind.v2.runtime.MarshallerImpl starts to write xml from jaxb Response object: com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write -> Can not output XML declaration, after other output has already been done.

          Should I use some particular version of Jaxb (java)?

          My java version is (build 1.6.0_07-b06).
          Spring ws is taken from trunk last week.

          org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]]: null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null
          at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:288)
          at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45)
          at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97)
          at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
          at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
          at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
          at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
          at org.mortbay.jetty.Server.handle(Server.java:326)
          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
          Caused by: javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null
          at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:331)
          at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67)
          at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
          at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
          at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
          at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
          at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72)
          at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294)
          at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
          at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282)
          ... 24 more
          Caused by: javax.xml.bind.MarshalException

          • with linked exception:
            [javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.]
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
            at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328)
            ... 33 more
            Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.
            at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547)
            at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576)
            at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643)
            at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153)
            at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263)
            at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source)
            ... 36 more
            2010-10-06 10:52:21.867::WARN: Nested in org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]]: null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null:
            javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.
            at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547)
            at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576)
            at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643)
            at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153)
            at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263)
            at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
            at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328)
            at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67)
            at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
            at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72)
            at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294)
            at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
            at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282)
            at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45)
            at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97)
            at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
            at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:326)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
            2010-10-06 12:14:00.336::WARN: /mpis/mpisValidating/
            org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]]: null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null
            at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:288)
            at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45)
            at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97)
            at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
            at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:326)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
            Caused by: javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null
            at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:331)
            at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67)
            at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
            at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72)
            at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294)
            at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
            at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282)
            ... 24 more
            Caused by: javax.xml.bind.MarshalException
          • with linked exception:
            [javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.]
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
            at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328)
            ... 33 more
            Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.
            at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547)
            at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576)
            at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643)
            at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153)
            at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263)
            at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source)
            ... 36 more
            2010-10-06 12:14:00.336::WARN: Nested in org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]]: null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]]: null:
            javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.
            at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547)
            at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576)
            at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655)
            at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643)
            at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153)
            at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263)
            at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source)
            at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source)
            at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328)
            at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67)
            at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691)
            at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283)
            at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245)
            at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72)
            at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294)
            at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193)
            at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282)
            at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45)
            at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97)
            at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
            at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
            at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
            at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
            at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
            at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
            at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
            at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
            at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
            at org.mortbay.jetty.Server.handle(Server.java:326)
            at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
            at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
            at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
            at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
            at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
            at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
          Show
          nikkeri Nikkeri2001 added a comment - Ok, I should be wery close now. For some reason I get stack trace on console and and response on client side contains only soap envelope and empty body. Client response looks like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body/> </soapenv:Envelope> If you could check the trace and tell your dependencies that may differ, please. Problems seems to start when com.sun.xml.internal.bind.v2.runtime.MarshallerImpl starts to write xml from jaxb Response object: com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write -> Can not output XML declaration, after other output has already been done. Should I use some particular version of Jaxb (java)? My java version is (build 1.6.0_07-b06). Spring ws is taken from trunk last week. org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]] : null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:288) at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:331) at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245) at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72) at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294) at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193) at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282) ... 24 more Caused by: javax.xml.bind.MarshalException with linked exception: [javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.] at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source) at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328) ... 33 more Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576) at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263) at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source) ... 36 more 2010-10-06 10:52:21.867::WARN: Nested in org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]] : null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576) at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263) at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source) at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328) at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245) at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72) at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294) at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193) at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282) at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) 2010-10-06 12:14:00.336::WARN: /mpis/mpisValidating/ org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]] : null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:288) at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:331) at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245) at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72) at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294) at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193) at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282) ... 24 more Caused by: javax.xml.bind.MarshalException with linked exception: [javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.] at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source) at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328) ... 33 more Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576) at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263) at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source) ... 36 more 2010-10-06 12:14:00.336::WARN: Nested in org.springframework.ws.soap.axiom.AxiomSoapMessageException: Could not write message to OutputStream: Could not marshal [[email protected]] : null; nested exception is javax.xml.stream.XMLStreamException: Could not marshal [[email protected]] : null: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done. at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1547) at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1576) at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:667) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:655) at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:643) at org.apache.axiom.util.stax.wrapper.XMLStreamWriterWrapper.writeStartDocument(XMLStreamWriterWrapper.java:153) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartDocument(MTOMXMLStreamWriter.java:263) at com.sun.xml.internal.bind.v2.runtime.output.XMLStreamWriterOutput.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.XMLSerializer.startDocument(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.prewrite(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(Unknown Source) at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor$JaxbStreamingPayload.writeTo(AbstractJaxb2PayloadMethodProcessor.java:328) at org.springframework.ws.soap.axiom.StreamingOMDataSource.serialize(StreamingOMDataSource.java:67) at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerialize(OMSourcedElementImpl.java:691) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:965) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:283) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:245) at org.apache.axiom.soap.impl.llom.SOAPMessageImpl.internalSerialize(SOAPMessageImpl.java:72) at org.apache.axiom.om.impl.llom.OMDocumentImpl.internalSerialize(OMDocumentImpl.java:294) at org.apache.axiom.om.impl.llom.OMSerializableImpl.serializeAndConsume(OMSerializableImpl.java:193) at org.springframework.ws.soap.axiom.AxiomSoapMessage.writeTo(AxiomSoapMessage.java:282) at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:45) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:97) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
          Hide
          thrantal Timo Rantalaiho added a comment -

          Hello,

          I thought that by setting

                  <property name="marshallerProperties">
                      <map>
                          <entry key="jaxb.fragment" value="false"/>
                      </map>
                  </property>

          for the Jaxb2Marshaller bean we could get rid of the extra prolog, but no dice. Debugging showed that the relevant code (createMarshaller, initMarshaller) was not even called! createUnMarshaller and initUnMarshaller were visited OK, but the same methods for Marshallers not.

          Then I realised that in JaxbStreamingPayload , the Marshaller is created directly with JaxbContext.createMarshaller() . Could it be that Jaxb2Marshaller should be used here, so that the Marshaller properties could be customised? At the moment, it's not possible to get to customise JaxbStreamingPayload behavior (without heavy copy-pasting), as it is a private class whose instance is created directly in AbstractJaxb2PayloadMethodProcessor where it's used.

          Best wishes,
          Timo

          Show
          thrantal Timo Rantalaiho added a comment - Hello, I thought that by setting < property name = "marshallerProperties" > < map > < entry key = "jaxb.fragment" value = "false" /> </ map > </ property > for the Jaxb2Marshaller bean we could get rid of the extra prolog, but no dice. Debugging showed that the relevant code (createMarshaller, initMarshaller) was not even called! createUnMarshaller and initUnMarshaller were visited OK, but the same methods for Marshallers not. Then I realised that in JaxbStreamingPayload , the Marshaller is created directly with JaxbContext.createMarshaller() . Could it be that Jaxb2Marshaller should be used here, so that the Marshaller properties could be customised? At the moment, it's not possible to get to customise JaxbStreamingPayload behavior (without heavy copy-pasting), as it is a private class whose instance is created directly in AbstractJaxb2PayloadMethodProcessor where it's used. Best wishes, Timo
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          @Timo

          This should now be fixed, as I set the JAXB_FRAGMENT now.

          The reason we are not using the Jaxb2Marshaller abstraction here is that this particular piece of functionality goes beyond what the abstraction can offer. In general, Spring-WS 2.0 has a lot more native JAXB2 support, since comes with the JDK now.

          Show
          arjen.poutsma Arjen Poutsma added a comment - @Timo This should now be fixed, as I set the JAXB_FRAGMENT now. The reason we are not using the Jaxb2Marshaller abstraction here is that this particular piece of functionality goes beyond what the abstraction can offer. In general, Spring-WS 2.0 has a lot more native JAXB2 support, since comes with the JDK now.
          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing old issues

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing old issues

            People

            • Assignee:
              arjen.poutsma Arjen Poutsma
              Reporter:
              arjen.poutsma Arjen Poutsma
            • Votes:
              16 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5d
                5d
                Remaining:
                Time Spent - 1d 1h 17m Remaining Estimate - 3d 6h 43m
                3d 6h 43m
                Logged:
                Time Spent - 1d 1h 17m Remaining Estimate - 3d 6h 43m
                1d 1h 17m