________________________________
> I don't know how I could just pass the "jsonInput" to the URL without even
> serializing it.
Thanks Tatu, I did modify the service like this:
@PUT
@Path("gml")
@Consumes("application/json")
public Response myMethod(final @QueryParam("oneId") Integer oneId, InputStream theInput) throws IOException {
ClientResponse gmlResponse;
try {
gmlResponse = client.resource(gmlUrl)
.accept("application/gml+xml")
.type(MediaType.APPLICATION_JSON_TYPE)
.entity(ByteStreams.toByteArray(theInput))
.get(ClientResponse.class);
} finally {
Closeables.closeQuietly(mapInput);
It looks like it works fine. The Input is never big so I guess it is just OK to use a plain byte copy.
Regards