I am using a RESTfull webservice with this methode:
@POST
@Consumes({\"application/json\"})
@Path(\"create/\")
public void create(String str1, String str2){
To set parameters to your HttpPostRequest you can use BasicNameValuePair, something like this :
HttpClient httpclient;
HttpPost httpPost;
ArrayList postParameters;
httpclient = new DefaultHttpClient();
httpPost = new HttpPost("your login link");
postParameters = new ArrayList();
postParameters.add(new BasicNameValuePair("param1", "param1_value"));
postParameters.add(new BasicNameValuePair("param2", "param2_value"));
httpPost.setEntity(new UrlEncodedFormEntity(postParameters, "UTF-8"));
HttpResponse response = httpclient.execute(httpPost);