Turns out you don’t have to do much at all.
See below – the parameter x
will contain the full HTTP body (which is XML in our case).
@POST
public Response go(String x) throws IOException {
...
}
More Related Contents:
- How to handle CORS using JAX-RS with Jersey
- MULTIPART_FORM_DATA: No injection source found for a parameter of type public javax.ws.rs.core.Response
- POST to Jersey REST service getting error 415 Unsupported Media Type
- JAX-RS / Jersey how to customize error handling?
- Jersey 415 Unsupported Media Type
- How to access parameters in a RESTful POST method
- SEVERE: MessageBodyWriter not found for media type=application/json, type=class com.jersey.jaxb.Todo, genericType=class com.jersey.jaxb.Todo
- what’s the correct way to send a file from REST web service to client?
- How to use Jersey as JAX-RS implementation without web.xml?
- How do I use the Jersey JSON POJO support?
- RESTful on Play! framework
- Listing all deployed rest endpoints (spring-boot, jersey)
- A message body writer for Java class java.util.ArrayList…and MIME media type text/xml was not found
- MessageBodyWriter not found for media type=application/json
- FileUpload with JAX-RS
- Jersey Exception : SEVERE: A message body reader for Java class
- How to serialize Java primitives using Jersey REST
- How to test a Jersey REST web service?
- Jersey: Return a list of strings
- Can I send an excel file and JSON body with a description of file in same REST API Response
- HTTP 500 Internal Server Error in simple REST based program. Confused in GET and POST while receiving/sending response from server
- Passing custom type query parameter
- How should I log uncaught exceptions in my RESTful JAX-RS web service?
- Jersey RESTful web service gradle setup
- Optional params in REST API request using Jersey 2.21
- The ResourceConfig instance does not contain any root resource classes
- How to POST form data with Spring RestTemplate?
- Jersey – How to mock service
- Enforce not-null field in JSON object
- CXF JAXRS – How do I pass Date as QueryParam