List of usage examples for org.springframework.http MediaType TEXT_XML
MediaType TEXT_XML
To view the source code for org.springframework.http MediaType TEXT_XML.
Click Source Link
From source file:com.wavemaker.commons.util.WMUtils.java
public static boolean isXmlMediaType(MediaType mediaType) { return MediaType.APPLICATION_XML.equals(mediaType) || MediaType.TEXT_XML.equals(mediaType) || MediaType.APPLICATION_ATOM_XML.equals(mediaType); }
From source file:fi.helsinki.opintoni.config.FlammaConfiguration.java
@Bean public RestTemplate flammaRestTemplate() { final AtomFeedHttpMessageConverter converter = new AtomFeedHttpMessageConverter(); converter.setSupportedMediaTypes(Collections.singletonList(MediaType.TEXT_XML)); return new RestTemplate(Collections.singletonList(converter)); }
From source file:fi.helsinki.opintoni.server.FlammaServer.java
public void expectStudentNews() { server.expect(requestTo(flammaBaseUrl + "/infotaulu/atom-tiedotteet-opiskelijalle.xml")) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(toText("flamma/studentnews.xml"), MediaType.TEXT_XML)); }
From source file:fi.helsinki.opintoni.server.FlammaServer.java
public void expectEnglishStudentNews() { server.expect(requestTo(flammaBaseUrl + "/infotaulu/atom-tiedotteet-opiskelijalle-en.xml")) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(toText("flamma/englishstudentnews.xml"), MediaType.TEXT_XML)); }
From source file:com.castlemock.web.basis.web.mvc.controller.project.ExportProjectController.java
/** * Creates and return a view that provides the required functionality * to export a project./* w w w . j a v a2 s .com*/ * @param projectType The type of the project that should be exported * @param projectId The id of the project that should be exported * @return A view that provides the required functionality to export a project */ @PreAuthorize("hasAuthority('READER') or hasAuthority('MODIFIER') or hasAuthority('ADMIN')") @RequestMapping(value = "{projectType}/project/{projectId}/export", method = RequestMethod.GET) public ResponseEntity<String> defaultPage(@PathVariable final String projectType, @PathVariable final String projectId) { final String exportedProject = projectServiceFacade.exportProject(projectType, projectId); HttpHeaders respHeaders = new HttpHeaders(); respHeaders.setContentType(MediaType.TEXT_XML); respHeaders.setContentDispositionFormData("attachment", "project-" + projectType + "-" + projectId + ".xml"); return new ResponseEntity<String>(exportedProject, respHeaders, HttpStatus.OK); }
From source file:fi.helsinki.opintoni.server.FlammaServer.java
public void expectTeacherNews() { server.expect(requestTo(flammaBaseUrl + "/infotaulu/atom-tiedotteet-opetusasiat.xml")) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(toText("flamma/teachernews.xml"), MediaType.TEXT_XML)); }
From source file:fi.helsinki.opintoni.server.FlammaServer.java
public void expectEnglishTeacherNews() { server.expect(requestTo(flammaBaseUrl + "/infotaulu/atom-tiedotteet-opetusasiat-en.xml")) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(toText("flamma/englishteachernews.xml"), MediaType.TEXT_XML)); }
From source file:org.nobel.highriseapi.mapper.SimpleXmlHttpMessageConverter.java
/** * Construct a new {@code SimpleXmlHttpMessageConverter} with a customized * {@link Serializer}. Sets the//from w w w . ja v a 2s .com * {@link #setSupportedMediaTypes(java.util.List) supportedMediaTypes} to * {@code text/xml} and {@code application/xml}, and * {@code application/*-xml}. */ public SimpleXmlHttpMessageConverter(Serializer serializer) { super(MediaType.APPLICATION_XML, MediaType.TEXT_XML); setSerializer(serializer); }
From source file:fi.helsinki.opintoni.server.FlammaServer.java
public void expectStudentOpenUniversityNews() { server.expect(requestTo(flammaBaseUrl + "/infotaulu/atom-tiedotteet-avoin.xml")) .andExpect(method(HttpMethod.GET)) .andRespond(withSuccess(toText("flamma/studentopenuniversitynews.xml"), MediaType.TEXT_XML)); }
From source file:net.solarnetwork.web.support.SimpleXmlHttpMessageConverter.java
/** * Default constructor. */ public SimpleXmlHttpMessageConverter() { super(MediaType.APPLICATION_XML, MediaType.TEXT_XML); }