I have simple POJO say User Object;
public class User{ private String userid; private String emailid; private String name; ....setters and getters... } Now,I want to set some values using setter methods of User class.
So,if i want to send this object to through service.
URL url = new URL("http://<servername>/example/someservice"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setRequestMethod("POST"); what would be the best approach for this ?
Thanks in advance.