java - Invalid byte 1 of 1-byte UTF-8 sequence: RestTemplate -


i integrating third party api using rest template, send response in format of xml. of request, getting below error.

could not unmarshal [class com.xxx.searchresponse]: null; nested exception javax.xml.bind.unmarshalexception\n - linked exception:\n[com.sun.org.apache.xerces.internal.impl.io.malformedbytesequenceexception: invalid byte 1 of 1-byte utf-8 sequence.

i tried contenttype "application/xml", "text/plain", "text/xml" , "text/xml,charset=utf-8"

only of response, getting error , xml response has many lines. hard detect characters facing problem. guess content type missing it.

xml element:

<search-response xmlns="" xmlns:info="" xmlns:common=""> <search-response> 

when hit third party api in postman, getting content type "text/xml;charset=iso-8859-1"


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -