-
Notifications
You must be signed in to change notification settings - Fork 317
Description
Arjen Poutsma opened SWS-239 and commented
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
Affects: 1.0.2
Issue Links:
- SAXParseException when using HttpURLConnection [SWS-245] #398 SAXParseException when using HttpURLConnection
("duplicates") - AxiomSoapMessageFactory throws NPE [SWS-230] #380 AxiomSoapMessageFactory throws NPE