-
-
Save anonymous/566c3ce9af6632c3198c to your computer and use it in GitHub Desktop.
MessageBodyWriter not found for media type=application/xml, type=class java.util.ArrayList, genericType=java.util.List<java.lang.String>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @GET | |
| @javax.ws.rs.Path("l") | |
| @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) | |
| @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) | |
| public Response Ef_Get_Anula_Documento() throws IOException { | |
| GenericEntity<List<String>> entity = new GenericEntity<List<String>>(getText()) { | |
| }; | |
| Response response = Response.ok(entity).build(); | |
| return response; | |
| } | |
| public ArrayList<String> getText() throws IOException { | |
| ArrayList<String> a = new ArrayList<>(); | |
| //Scanner Example - read file line by line in Java using Scanner | |
| FileInputStream fis = new FileInputStream("C:/new5.log"); | |
| Scanner scanner = new Scanner(fis); | |
| while (scanner.hasNextLine()) { | |
| a.add(scanner.nextLine()); | |
| } | |
| return a; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment