Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/xml not supported when using Jackson #1749

Closed
BigMichi1 opened this issue Oct 23, 2014 · 5 comments
Closed

text/xml not supported when using Jackson #1749

BigMichi1 opened this issue Oct 23, 2014 · 5 comments

Comments

@BigMichi1
Copy link
Contributor

with #1580 there was support included for Jackson based XML serialization, but when we enable this support

        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
        </dependency>

we loose support for /text/xml processing by our rest templates. it seems that jackson only supports application/xml

@wilkinsona
Copy link
Member

I guess you were using JAXB previously? The JAXB-based HttpMessageConverters support text/xml, application/xml, and application/*-xml whereas, as you've observed, MappingJackson2XmlHttpMessageConverter only supports application/xml. Spring Framework is responsible for this default configuration. We could override it in Boot, but, before we do that, I'd like to understand the reasons for the difference. @sdeleuze can you comment please?

@sdeleuze
Copy link
Contributor

Good catch, I have created the related SPR-12366 issue, and will fix it shortly. The fix will be in Spring Framework 4.1.2, so Spring Boot 1.2 will also have the right behavior.

@sdeleuze
Copy link
Contributor

This issue is now fixed in Spring Framework master with this commit, and will be available in next 4.1.2.BUILD-SNAPSHOT build.

@wilkinsona
Copy link
Member

@sdeleuze Thanks

@dsyer dsyer added the question label Oct 27, 2014
@wilkinsona
Copy link
Member

Boot 1.2 snapshots are now using Spring 4.1.2 so you should no longer see this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants