Hi I get a SAX parser exception as "Content is not allowed in prolog" while parsing the response. I have included the response that I receive from the server and the stack trace of the exception. Also there are no junk characters before or after the response.
Can someone please explain what can cause this exception? Is anything wrong in the response? This is a repost as there were no replies for the earlier one. I need to get this working ASAP. Thanks Ramya RESPONSE ---------- HTTP/1.1 200 OK Accept: application/soap+xml, application/dime, multipart/related, text/* Cache-Control: no-cache Content-Type: text/xml; charset="UTF-8" Host: 127.0.0.1 Pragma: no-cache User-Agent: enlistSrv Content-Length: 728 <?xml version="1.0" encoding="UTF-8"?> <E:Envelope xmlns:E="http://schemas.xmlsoap.org/soap/envelope/" xmlns:A="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.w3.org/2001/XMLSchema" E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <E:Body> <m:ConnectResponse xmlns:m="http://www.PersistentData.com/enList"> <m:connectionid s:type="y:int">3</m:connectionid> <m:result> <m:resultCode s:type="y:int">0</m:resultCode> <m:errorCode s:type="y:int">0</m:errorCode> <m:errorMessage s:type="y:string"></m:errorMessage> <m:diagonsticMessage s:type="y:string"></m:diagonsticMessage> <m:size s:type="y:int">0</m:size> </m:result> </m:ConnectResponse> </E:Body> </E:Envelope> STACKTRACE ---------- " org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.axis.AxisFault.makeFault(AxisFault.java:129) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:562) at org.apache.axis.Message.getSOAPEnvelope(Message.java:376) at org.apache.axis.client.Call.invokeEngine(Call.java:2600) at org.apache.axis.client.Call.invoke(Call.java:2565) at org.apache.axis.client.Call.invoke(Call.java:2254) at org.apache.axis.client.Call.invoke(Call.java:2177) at org.apache.axis.client.Call.invoke(Call.java:1694) at com.PersistentData.www.enList.ServiceBindingStub.connect(ServiceBindingStub.java :312) at Client.main(Client.java:32) Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerW rapper.ja va:236) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:2 15) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:314) at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner.java:1436) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocum entScanne rImpl.java:857) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFr agmentSca nnerImpl.java:338) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:828) at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:758) at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148) at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1178) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContext Impl.java :272) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:554) ... 8 more "
