I'm using this to get pojo result from web service returning json:
String wsURI = "server.com/myservice?param=a";
try {
URL url = new URL(wsURI);
URLConnection connection = url.openConnection();
ObjectMapper mapper = new ObjectMapper();
ResultPojo resultPojo = mapper.readValue(connection.getInputStream(), ResultPojo.class);
} catch (Exception e) {}
But now I want to send pojo to the webservice (the web service accepting json):
String wsURI = "server.com/myservice?param=myPojo";
How to achieve this? Is it possible or do I need to use some other libs & jars?
Thanks,