xml - SAXParseException with AXIS Webservice Framework -
we working on webservice solution. webservice api provides several calls using can retrieve soap response client webservice implementaion.
the implementation based on axis framework.
all api calls work except in 1 facing saxparseexception when response back.
when try in soap ui valid response particular api . when try in java project saxparseexception. both java , soap ui projects have been created using same wsdl file
please have @ stacktrace below , share humble opinion might have gone wrong here.
xml received: 2013-05-14 12:12:20,536 debug http-bio-8080-exec-1 org.apache.axis.transport.http.httpsender - ----------------------------------------------- 2013-05-14 12:12:20,536 debug http-bio-8080-exec-1 org.apache.axis.soappart - enter: soappart::getassoapenvelope() 2013-05-14 12:12:20,536 debug http-bio-8080-exec-1 org.apache.axis.i18n.projectresourcebundle - org.apache.axis.i18n.resource::handlegetobject(currform) 2013-05-14 12:12:20,536 debug http-bio-8080-exec-1 org.apache.axis.soappart - current form form_inputstream 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.transport.http.httpsender - org.xml.sax.saxparseexception: root element required in well-formed document. 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.soappart - enter: soappart ctor(form_fault) 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.i18n.projectresourcebundle - org.apache.axis.i18n.resource::handlegetobject(setmsgform) 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.soappart - setting current message form to: form_fault (currentmessage org.apache.axis.axisfault) 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.soappart - exit: soappart ctor() 2013-05-14 12:12:20,708 debug http-bio-8080-exec-1 org.apache.axis.i18n.projectresourcebundle - org.apache.axis.i18n.resource::handlegetobject(toaxisfault00) 2013-05-14 12:12:20,740 debug http-bio-8080-exec-1 org.apache.axis.enterprise - mapping exception axisfault axisfault faultcode: {http://schemas.xmlsoap.org/soap/envelope/}server.userexception faultsubcode: faultstring: org.xml.sax.saxparseexception: root element required in well-formed document. faultactor: faultnode: faultdetail: {http://xml.apache.org/axis/}stacktrace:org.xml.sax.saxparseexception: root element required in well-formed document. @ org.apache.xerces.framework.xmlparser.reporterror(xmlparser.java:1213) @ org.apache.xerces.framework.xmldocumentscanner.reportfatalxmlerror(xmldocumentscanner.java:570) @ org.apache.xerces.framework.xmldocumentscanner$xmldecldispatcher.endofinput(xmldocumentscanner.java:790) @ org.apache.xerces.framework.xmldocumentscanner.endofinput(xmldocumentscanner.java:418) @ org.apache.xerces.validators.common.xmlvalidator.sendendofinputnotifications(xmlvalidator.java:712) @ org.apache.xerces.readers.defaultentityhandler.changereaders(defaultentityhandler.java:1031) @ org.apache.xerces.readers.xmlentityreader.changereaders(xmlentityreader.java:168) @ org.apache.xerces.readers.abstractcharreader.changereaders(abstractcharreader.java:150) @ org.apache.xerces.readers.abstractcharreader.lookingatchar(abstractcharreader.java:217) @ org.apache.xerces.framework.xmldocumentscanner$xmldecldispatcher.dispatch(xmldocumentscanner.java:686) @ org.apache.xerces.framework.xmldocumentscanner.parsesome(xmldocumentscanner.java:381) @ org.apache.xerces.framework.xmlparser.parse(xmlparser.java:1098) @ javax.xml.parsers.saxparser.parse(unknown source) @ org.apache.axis.encoding.deserializationcontext.parse(deserializationcontext.java:227) @ org.apache.axis.soappart.getassoapenvelope(soappart.java:696) @ org.apache.axis.message.getsoapenvelope(message.java:435) @ org.apache.axis.transport.http.httpsender.readfromsocket(httpsender.java:796) @ org.apache.axis.transport.http.httpsender.invoke(httpsender.java:144) @ org.apache.axis.strategies.invocationstrategy.visit(invocationstrategy.java:32) @ org.apache.axis.simplechain.dovisiting(simplechain.java:118) @ org.apache.axis.simplechain.invoke(simplechain.java:83) @ org.apache.axis.client.axisclient.invoke(axisclient.java:165) @ org.apache.axis.client.call.invokeengine(call.java:2784) @ org.apache.axis.client.call.invoke(call.java:2767) @ org.apache.axis.client.call.invoke(call.java:2443) @ org.apache.axis.client.call.invoke(call.java:2366) @ org.apache.axis.client.call.invoke(call.java:1812)
it seems got no valid xml in response ... that.
<?xml version="1.0"?> <node1> ... bla, bla </node1> <node2> ... bla, bla </node2> <node_x> ... bla, bla </node_x> instead ...
<?xml version="1.0"?> <node1> <node2> ... bla, bla </node2> <node_x> ... bla, bla </node_x> </node1> you should sniff network traffic see content in raw format. error if construct xml code hand , not known tools.
Comments
Post a Comment