I have a Java based web service client connected to Java web service (implemented on the Axis1 framework).
I am getting following exception in my log file:
As Mike Sokolov has already pointed it out, one of the possible reasons is presence of some character/s (such as a whitespace) before the tag.
If your input XML is being read as a String (as opposed to byte array) then you can use replace your input string with the below code to make sure that all 'un-necessary' characters before the xml tag are wiped off.
inputXML=inputXML.substring(inputXML.indexOf("
You need to be sure that the input xml starts with the xml tag though.