Spring RestTemplate POST method for Xml Response?

折月煮酒 提交于 2019-12-06 01:09:45
Satish Pandey

You need to add xml message converter to covert the xml messages to java objects.

See solution Stack Overflow

Also you can capture the result in String format and manually handle it then. Example :

String xmlData = restTemplate.postForObject(url, parameters, String.class);
// pass this string to xml parser and prepare java object

Sample xml Parsing example

Hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!