Originally Posted by
anoopasta
Dear Sir,
I am using a webservices which uses Soap with attachment to transmit zip file to their server. I followed the sample code provided and getting the error. The stack trace is paseted below. Any help in this regard will be highly appreciated.
Regards
Anoop
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTracerg.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner .reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.pa rse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPar t.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.ja va:435)
at org.apache.axis.handlers.soap.MustUnderstandChecke r.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClien t.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java :2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at in.gov.incometaxindiaefiling.itrservice.v_1_0.ITRS erviceSoapBindingStub.submitITR(ITRServiceSoapBind ingStub.java:255)
at in.gov.incometaxindiaefiling.itrservice.v_1_0.ITRS ervicePortProxy.submitITR(ITRServicePortProxy.java :50)
at UploadXML.doGet(UploadXML.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11C onnectionHandler.process(Http11AprProtocol.java:57 9)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run( AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
{http://xml.apache.org/axis/}hostname:astaserver
org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
at org.apache.axis.AxisFault.makeFault(AxisFault.java :101)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPar t.java:701)
at org.apache.axis.Message.getSOAPEnvelope(Message.ja va:435)
at org.apache.axis.handlers.soap.MustUnderstandChecke r.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClien t.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java :2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at in.gov.incometaxindiaefiling.itrservice.v_1_0.ITRS erviceSoapBindingStub.submitITR(ITRServiceSoapBind ingStub.java:255)
at in.gov.incometaxindiaefiling.itrservice.v_1_0.ITRS ervicePortProxy.submitITR(ITRServicePortProxy.java :50)
at UploadXML.doGet(UploadXML.java:150)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.proces s(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11C onnectionHandler.process(Http11AprProtocol.java:57 9)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run( AprEndpoint.java:1555)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner .reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.pa rse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPar t.java:696)
... 25 more
Looks like your formatting is wrong somewhere.