Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Soap With Attachment AXIS Fault

  1. #1
    Junior Member
    Join Date
    May 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Soap With Attachment AXIS Fault

    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


  2. #2
    Banned
    Join Date
    May 2010
    Location
    North Central Illinois
    Posts
    1,631
    My Mood
    Sleepy
    Thanks
    390
    Thanked 112 Times in 110 Posts

    Default Re: Soap With Attachment AXIS Fault

    Quote Originally Posted by anoopasta View Post
    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.
    Last edited by javapenguin; November 23rd, 2010 at 11:17 AM.

Similar Threads

  1. Simple Java SOAP client
    By andy in forum Java Networking
    Replies: 3
    Last Post: December 16th, 2010, 04:05 PM
  2. How to place icon on a picture base on (x,y) axis
    By FaintSmile in forum Java Theory & Questions
    Replies: 1
    Last Post: July 13th, 2010, 07:27 AM
  3. Not able to receive SOAP response
    By abhisekh in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 12th, 2010, 07:20 AM
  4. retrieve the video stream from an Axis camera
    By nesrine18 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 3rd, 2010, 03:39 AM
  5. Javamail attachment filenames
    By johniem in forum Java Theory & Questions
    Replies: 0
    Last Post: February 3rd, 2010, 07:51 AM