मैं अगर कोई त्रुटि हुई एक गैर 200 प्रतिक्रिया सक्षम करने के लिए जर्सी डॉक्स का पालन करने के लिए कोशिश कर रहा हूँ नहीं मिला (https://jersey.java.net/documentation/latest/representations.html#d0e3586)जर्सी MessageBodyWriter मीडिया प्रकार = पाठ/सादे
मेरे कोड लगता है:
@POST
@Produces(MediaType.TEXT_PLAIN)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public ResponseBuilder getData(@FormParam("one") String one,@FormParam("two") String two,@FormParam("three") String three) {
if(one.isEmpty() || two.isEmpty() || three.isEmpty()) {
logger.error("Missing params for getData");
throw new WebApplicationException(501);
}
return Response.ok();
}
}
[2015-02-01T16: 13: ०२.१५७ + 0000] [glassfish 4.1] [गंभीर] [] [org.glassfish.jersey.message.internal.WriterInterceptorExecutor
यह दुर्भाग्य निम्न त्रुटि पैदावार ] [tid: _ThreadID = 27 _ThreadName = http-listener-1 (2)] [timeMillis: 1422807182157] [levelValue: 1000] [[ संदेशबॉडीवाइटर मीडिया प्रकार = टेक्स्ट/सादा, प्रकार = वर्ग org.glassfish.jersey.message.internal.OutboundJaxrsResponse $ बिल्डर के लिए नहीं मिला , जेनेरिक टाइप = क्लास javax.ws.rs.core.Response $ ResponseBuilder।]]
ओह मैं अभी इतना मूर्ख है! –
यदि यह मदद नहीं करता है। मैं प्रतिक्रिया वापस करता हूँ। –