org.xml.sax.SAXParseException: Content is not allowed in prolog

前端 未结 30 2380
别那么骄傲
别那么骄傲 2020-11-22 02:54

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:

30条回答
  •  生来不讨喜
    2020-11-22 03:35

    In my case I got this error because the API I used could return the data either in XML or in JSON format. When I tested it using a browser, it defaulted to the XML format, but when I invoked the same call from a Java application, the API returned the JSON formatted response, that naturally triggered a parsing error.

提交回复
热议问题