cancel
Showing results for 
Search instead for 
Did you mean: 

Got SAXParseException as called repository getStores API

winson
Champ in-the-making
Champ in-the-making
Hi,

I'm playing with web service sample Java program (GetStores.java)  that uses web service APIs to retrieve store information from server.  But I always receive  SAXParseException of "The markup in the document following the root element must be well-formed".  The full calling stack is as follow.

org.apache.axis.AxisFault: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}stackTraceSmiley Surprisedrg.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
   at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
   at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
   at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
   at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.server.AxisServer.initSOAPConstants(AxisServer.java:345)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Unknown Source)

   {http://xml.apache.org/axis/}hostname:Megaserver

org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
   at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
   at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
   at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
   at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1326)
   at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:340)
   at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:307)
   at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:212)
   at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
   at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
   at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.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 org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.update(RepositoryServiceSoapBindingStub.java:986)
   at oracle.alminternal.view.TestSample.main(TestSample.java:55)


From the network sniffer, I got the getStore request with extra end document tag as it was shown in bold below.  The same exception seems to also happen to other API, such as repository update API.  Would someone help me resolve this or point me to the direction that I can find the solution?  Thanks a lot.

BTW, I'm using Alfresco 2.1 server and client.

<?xml version="1.0" encoding="UTF-8"?>
<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:Header>
  <wsseSmiley Frustratedecurity xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
  <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-16551541">
  <wsse:Username>ticket</wsse:Username>
  <wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
  TICKET_df658c1812fe628e07f4dcbb87e38de300095405
  </wsseSmiley Tongueassword>
  </wsse:UsernameToken>
  </wsseSmiley Frustratedecurity>
  </soapenv:Header>
  <soapenv:Body>
    <getStores xmlns="http://www.alfresco.org/ws/service/repository/1.0">
    </getStores>
  </soapenv:Body>
</soapenv:Envelope>
</#document>
11 REPLIES 11

vasantham
Champ in-the-making
Champ in-the-making
HI all,
can anyone tell me the path for oracle.xml  & orion-application.xml ?

Thanks,
vasanth.

n_pancholi87
Champ in-the-making
Champ in-the-making
Facing a similar error. I receive SAXParseException of "org.apache.axis.AxisFault: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed." when I run it with Oracle app server 11i. But when I run it as a standalone java program it is working fine. I am using Alfresco Enterprise 3.4.

The above solution mentioned cannot help since I do not have permission to make changes on Oracle server. Pls suggest a solution on Alfresco front asap.