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

Using Axiom with payload caching off sometimes creates empty soap bodies


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: 1.5.3
    • Component/s: Core
    • Labels:


      It appears that if you're using Castor to marshal your responses, and you're using Axiom without payload caching, that the SOAP response comes back with an empty Soap Body. I did not try this with other Marshalling technologies like JAXB, etc, so I'm not sure if it is restricted to Castor only or not.

      It looks like NonCachingPayload.DelegatingStreamWriter.writeEndDocument() never gets called at least when marshalling with Castor. Castor by default does not fire an endDocument SAX event (or close or flush for that matter). But if you call setMarshalAsDocument(true) on a castor marshaller it does call endDocument().

      I just now worked around this with Castor by creating a simple subclass of CastorMarshaller like this below:
      public class MyCastorMarshaller extends CastorMarshaller {
      protected void customizeMarshaller(Marshaller marshaller)

      { super.customizeMarshaller(marshaller); marshaller.setMarshalAsDocument(true); }


      See this forum thread for additional details: http://forum.springframework.org/showthread.php?p=181732&posted=1#post181732


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        15d 16h 39m 1 Arjen Poutsma 06/Jun/08 2:56 AM
        Resolved Resolved Closed Closed
        45d 19h 11m 1 Arjen Poutsma 21/Jul/08 10:07 PM


          • Assignee:
            arjen.poutsma Arjen Poutsma
            jim Jim Cummings
          • Votes:
            0 Vote for this issue
            3 Start watching this issue


            • Created: