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

SAXParseException WebServiceTemplate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: 1.0.2
    • Fix Version/s: None
    • Component/s: OXM
    • Labels:
      None
    • Environment:
      JDK 1.5 OS Windows XP

      Description

      Using the WebServiceTemplate with XML Beans marshaller gives me following error:

      Exception in thread "main" org.springframework.ws.soap.saaj.SaajSoapEnvelopeException: Could not access envelope: org.xml.sax.SAXParseException: Premature end of file.; nested exception is javax.xml.soap.SOAPException: org.xml.sax.SAXParseException: Premature end of file.
      Caused by: javax.xml.soap.SOAPException: org.xml.sax.SAXParseException: Premature end of file.
      at org.apache.axis.SOAPPart.getEnvelope(SOAPPart.java:1005)
      at org.springframework.ws.soap.saaj.Saaj12Implementation.getEnvelope(Saaj12Implementation.java:142)
      at org.springframework.ws.soap.saaj.SaajSoapMessage.getEnvelope(SaajSoapMessage.java:86)
      at org.springframework.ws.soap.AbstractSoapMessage.getSoapBody(AbstractSoapMessage.java:36)
      at org.springframework.ws.soap.AbstractSoapMessage.hasFault(AbstractSoapMessage.java:56)
      at org.springframework.ws.client.core.WebServiceTemplate.hasFault(WebServiceTemplate.java:509)
      at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:411)
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:264)
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:252)
      at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:244)
      at be.vlaanderen.dho.client.WebserviceClient.<init>(WebserviceClient.java:76)
      at be.vlaanderen.dho.client.WebserviceClient.main(WebserviceClient.java:81)
      Caused by: org.xml.sax.SAXParseException: Premature end of file.
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
      at org.apache.axis.SOAPPart.getEnvelope(SOAPPart.java:1003)
      ... 11 more
      Caused by: org.xml.sax.SAXParseException: Premature end of file.
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
      at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
      at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
      at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
      at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
      ... 12 more

      TCPMon log showing the request:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <ann:AnnuleerInschrijvingVoorOpleiding xmlns:ann="http://annuleerinschrijvingvooropleiding.inschrijvingdienst.dho.vlaanderen.be">
      <Verzoek>
      <Context>
      <Bericht>
      <Tijdstip>
      <Datum>12-12-2008</Datum>
      <Tijd>00:00:00.000</Tijd>
      </Tijdstip>
      <Afzender>
      <Identificatie>34343</Identificatie>
      <Hoedanigheid>hoe</Hoedanigheid>
      <Naam>van de bos</Naam>
      <OrganisatieEenheid>ICT</OrganisatieEenheid>
      <Gebruiker>jos</Gebruiker>
      <Referte>0004444</Referte>
      </Afzender>
      </Bericht>
      </Context>
      <Vragen>
      <Vraag>
      <VraagInhoud>
      <InschrijvingID>007</InschrijvingID>
      </VraagInhoud>
      </Vraag>
      </Vragen>
      </Verzoek>
      </ann:AnnuleerInschrijvingVoorOpleiding>
      </soapenv:Body>
      </soapenv:Envelope>

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: