I'm trying to write a restful web service in java that will take a few string params and a binary file (pdf) param.
I understand how to do the strings but I'm getting hung up on the binary file. Any ideas / examples?
Here's what I have so far
@GET
@ConsumeMime("multipart/form-data")
@ProduceMime("text/plain")
@Path("submit/{client_id}/{doc_id}/{html}/{password}")
public Response submit(@PathParam("client_id") String clientID,
@PathParam("doc_id") String docID,
@PathParam("html") String html,
@PathParam("password") String password,
@PathParam("pdf") File pdf) {
return Response.ok("true").build();
}