The WADL for this shows only one parameter. Did I miss something?

@POST
@Consumes("multipart/mixed")
@Produces({"application/json", "application/x-jackson-smile"})
@Path("annotate")
public Response annotate(
    @Multipart(value = "options", type = "application/json")
    Map<String, String> options,
    @Multipart(value = "text") InputStream text) throws IOException,
RosetteException {

    final ObjectMapper mapper = getMapper();
    AnnotatedText inputText = mapper.readValue(text, AnnotatedText.class);
    final AnnotatedText result = pipeline.createAnnotator().annotate(inputText);

    StreamingOutput stream = new StreamingOutput() {
        @Override
        public void write(OutputStream os) throws IOException,
WebApplicationException {
            mapper.writeValue(os, result);
        }
    };
    return Response.ok(stream).build();
}

Reply via email to