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

Marshalling with Castor and Axiom results in a XMLStreamException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.2
    • Fix Version/s: 1.5 M1, 1.0.3
    • Component/s: Core
    • Labels:
      None

      Description

      Exception in thread "main" org.springframework.oxm.castor.CastorUnmarshalling FailureException: Castor unmarshalling exception: ParseError at [row,col]:[1,8192]
      Message: Unexpected end of stream; nested exception is javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,8192]
      Message: Unexpected end of stream
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,8192]
      Message: Unexpected end of stream

      at org.springframework.xml.stream.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:70)
      at org.springframework.xml.stream.AbstractStaxXmlRead er.parse(AbstractStaxXmlReader.java:50)
      at org.springframework.oxm.castor.CastorMarshaller.un marshalSaxReader(CastorMarshaller.java:286)
      at org.springframework.oxm.castor.CastorMarshaller.un marshalXmlStreamReader(CastorMarshaller.java:297)
      at org.springframework.oxm.AbstractMarshaller.unmarsh alStaxSource(AbstractMarshaller.java:301)
      at org.springframework.oxm.AbstractMarshaller.unmarsh al(AbstractMarshaller.java:125)
      at org.springframework.ws.support.MarshallingUtils.un marshal(MarshallingUtils.java:65)
      at org.springframework.ws.client.core.WebServiceTempl ate$2.extractData(WebServiceTemplate.java:275)
      at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:416)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 264)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 252)
      at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 244)

      In my opinion this is the first bug. Also when payloadCaching is enabled, the same error message has to occur.

      To see where the stream ends I changed the code of org.springframework.ws.soap.axiom.AxiomSoapMessage :

      public AxiomSoapMessage(SOAPMessage soapMessage, Attachments attachments, String soapAction, boolean payloadCaching) {

      Assert.notNull(soapMessage, "'soapMessage' must not be null");
      Assert.notNull(attachments, "'attachments' must not be null");
      System.out.println(soapMessage.getOMDocumentElemen t().toString());
      ...

      And wow, it worked correctly. So I think there is a second bug. The SOAP message is not fully parsed. Possibly that is because of the size. The mssage has more than 1 MB, so maybe there is buffering problem or something

        Issue Links

          Activity

          Hide
          arjen.poutsma Arjen Poutsma added a comment -

          Closing issues for 1.5.0 M1

          Show
          arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.0 M1

            People

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

              Dates

              • Created:
                Updated:
                Resolved: