Search in sources :

Example 1 with XmlMessageConverter

use of org.hisp.dhis.webapi.mvc.messageconverter.XmlMessageConverter in project dhis2-core by dhis2.

the class MvcTestConfig method configureMessageConverters.

@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    Arrays.stream(Compression.values()).forEach(compression -> converters.add(new JsonMessageConverter(nodeService(), compression)));
    Arrays.stream(Compression.values()).forEach(compression -> converters.add(new XmlMessageConverter(nodeService(), compression)));
    converters.add(new StringHttpMessageConverter());
    converters.add(new ByteArrayHttpMessageConverter());
    converters.add(new FormHttpMessageConverter());
    converters.add(mappingJackson2HttpMessageConverter());
    converters.add(mappingJackson2XmlHttpMessageConverter());
}
Also used : FormHttpMessageConverter(org.springframework.http.converter.FormHttpMessageConverter) JsonMessageConverter(org.hisp.dhis.webapi.mvc.messageconverter.JsonMessageConverter) ByteArrayHttpMessageConverter(org.springframework.http.converter.ByteArrayHttpMessageConverter) XmlMessageConverter(org.hisp.dhis.webapi.mvc.messageconverter.XmlMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter)

Example 2 with XmlMessageConverter

use of org.hisp.dhis.webapi.mvc.messageconverter.XmlMessageConverter in project dhis2-core by dhis2.

the class WebMvcConfig method configureMessageConverters.

@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
    Arrays.stream(Compression.values()).forEach(compression -> converters.add(new JsonMessageConverter(nodeService(), compression)));
    Arrays.stream(Compression.values()).forEach(compression -> converters.add(new XmlMessageConverter(nodeService(), compression)));
    converters.add(new StringHttpMessageConverter(StandardCharsets.UTF_8));
    converters.add(new ByteArrayHttpMessageConverter());
    converters.add(new FormHttpMessageConverter());
    converters.add(mappingJackson2HttpMessageConverter());
    converters.add(mappingJackson2XmlHttpMessageConverter());
}
Also used : FormHttpMessageConverter(org.springframework.http.converter.FormHttpMessageConverter) JsonMessageConverter(org.hisp.dhis.webapi.mvc.messageconverter.JsonMessageConverter) ByteArrayHttpMessageConverter(org.springframework.http.converter.ByteArrayHttpMessageConverter) XmlMessageConverter(org.hisp.dhis.webapi.mvc.messageconverter.XmlMessageConverter) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter)

Aggregations

JsonMessageConverter (org.hisp.dhis.webapi.mvc.messageconverter.JsonMessageConverter)2 XmlMessageConverter (org.hisp.dhis.webapi.mvc.messageconverter.XmlMessageConverter)2 ByteArrayHttpMessageConverter (org.springframework.http.converter.ByteArrayHttpMessageConverter)2 FormHttpMessageConverter (org.springframework.http.converter.FormHttpMessageConverter)2 StringHttpMessageConverter (org.springframework.http.converter.StringHttpMessageConverter)2