Solved

org.xml.sax.SAXParseException: Premature end of file.

Posted on 2010-09-19
2
2,172 Views
Last Modified: 2013-11-18
I am getting following result for an web service call why this happens ?



<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<SOAP-ENV:Header>
  <wsa:ReplyTo>
    <wsa:Address>
      http://www.w3.org/2005/08/addressing/none
    </wsa:Address>
    <wsa:ReferenceParameters>
      <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2">
        urn:uuid:234444
      </axis2:ServiceGroupId>
    </wsa:ReferenceParameters>
  </wsa:ReplyTo>
</SOAP-ENV:Header>
      <SOAP-ENV:Body>
            <dgp:getSayacVerisCekisBySayac xmlns="" xmlns:dgp="http://ws.dgpys.deloitte.com">
                  <date xmlns:dateTime="2010-08-01"/>
                  <sayac xmlns:string="2333388" />
            </dgp:getSayacVerisCekisBySayac>
      </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

 faultSubcode: 

 faultString: org.xml.sax.SAXParseException: Premature end of file.

 faultActor: 

 faultNode: 

 faultDetail: 

	{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Premature end of file.

	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

	at javax.xml.parsers.SAXParser.parse(Unknown Source)

	at com.ddtek.xquery.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

	at com.ddtek.xquery.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

	at com.ddtek.xquery.axis.Message.getSOAPEnvelope(Message.java:435)

	at com.ddtek.xquery.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)

	at com.ddtek.xquery.axis.client.AxisClient.invoke(AxisClient.java:206)

	at com.ddtek.xquery.axis.client.Call.invokeEngine(Call.java:2784)

	at com.ddtek.xquery.axis.client.Call.invoke(Call.java:2767)

	at com.ddtek.xquery.axis.client.Call.invoke(Call.java:1910)

	at com.exln.stylus.webservice.AxisStub.send(AxisStub.java:128)



	{http://xml.apache.org/axis/}hostname:Cahit-PC



org.xml.sax.SAXParseException: Premature end of file.

	at com.ddtek.xquery.axis.AxisFault.makeFault(AxisFault.java:101)

	at com.ddtek.xquery.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)

	at com.ddtek.xquery.axis.Message.getSOAPEnvelope(Message.java:435)

	at com.ddtek.xquery.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)

	at com.ddtek.xquery.axis.client.AxisClient.invoke(AxisClient.java:206)

	at com.ddtek.xquery.axis.client.Call.invokeEngine(Call.java:2784)

	at com.ddtek.xquery.axis.client.Call.invoke(Call.java:2767)

	at com.ddtek.xquery.axis.client.Call.invoke(Call.java:1910)

	at com.exln.stylus.webservice.AxisStub.send(AxisStub.java:128)

Caused by: org.xml.sax.SAXParseException: Premature end of file.

	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)

	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)

	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)

	at javax.xml.parsers.SAXParser.parse(Unknown Source)

	at com.ddtek.xquery.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

	at com.ddtek.xquery.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

	... 7 more

Open in new window

0
Comment
Question by:3XLcom
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 33711423
Possibly because the server is not returning the full, correct xml
0
 

Author Closing Comment

by:3XLcom
ID: 33711442
I found the problem it cause because instead of this :


I need to use this :

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse shortcuts 9 55
Interview question Javascript, database 12 63
Make Line Items Look Good Over Mobile 2 61
Which non-HTML GUI front end to use with Java? 3 22
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question