Recently, a 2 days ago we started to experience exception in google gdata client in Java, when trying to access contacts (feed : /m8/feeds/contacts/default/full). The exception is :
com.google.gdata.util.ParseException: No parser for content type:application-xml[application/xml]
at com.google.gdata.client.Service.parseResponseData(Service.java:2142)
at com.google.gdata.client.Service.parseResponseData(Service.java:2098)
at com.google.gdata.client.Service.getFeed(Service.java:1136)
at com.google.gdata.client.Service.getFeed(Service.java:1077)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:676)
at com.google.gdata.client.Service.getFeed(Service.java:1034)
Did some sniffing with Wireshark and in the google documentation I see that correct responses should come with Content type : application/atom+xml but failed responses from google now coming with Content Type : application/xml. Seems that something changed in google, and now it's returnes not correct content type and our code stopped to work (it was working fine for few years).
Need to say that part of the google app tenants (our customers) still working fine (with the same code) , but some parts of the customers is failing.
Is there any possible workaround for that issue ?
Thanks
The problem was fixed on Google side, so there is nothing to do on our side.
来源:https://stackoverflow.com/questions/51995274/google-contacts-gdata-java-fails-on-no-parser-for-content-typeapplication-xml