• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Content type 'application/xml' not supported  RSS feed

 
Ranch Hand
Posts: 630
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen that this is quite a common problem, but it seems to trigger  a whole raft of possible soultions. I have a simple POJO




In my pom I have


And a controller



in all the examples I am told I only need


the header is text/xml

request is
 
Tony Evans
Ranch Hand
Posts: 630
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I should add the header is set to application/xml.in fact I tried both application/xml \nd text/xml
 
Saloon Keeper
Posts: 10104
212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So have you tried setting the consumes parameter of the @RequestMapping annotation?
 
Tony Evans
Ranch Hand
Posts: 630
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi yes I have tried with consume, but I should not have to, its should look at the header. I am sure I am missing a dependency in my pom.xml, but have no idea what.

[code]
@RequestMapping(value = "/findfunds/", method = RequestMethod.POST, consumes = "application/xml")
public Funds findBanks(@RequestBody FundRequest request, UriComponentsBuilder ucBuilder)
throws ParseException {
logger.info("Find Funds");
Funds funds = fundService.listFunds(request.getFundIds());
return funds;
}
[code]
 
Stephan van Hulst
Saloon Keeper
Posts: 10104
212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you're missing the com.fasterxml.jackson.dataformat:jackson-dataformat-xml dependency.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!