title: How to communicate to a RESTful Webservice in Android Client
body: <p>I have developed a rest webservice using ( Java + Jersey )...
  the service needs to communicate with the user i.e. the user needs to fill a form in android client app and send it back to rest webservice where it will be processed and accordingly the user will get the output...</p>
  
  <p>When i first made the rest webservice i had used a webclient...and so was able to send and recieve request in form parameters as "post" and "get"...  </p>
  
  <p>But how to do the same in android as there is no form tags which have attributes like  <code>method="post"</code>  </p>
  
  <p>i have been instructed to use XML parsing.</p>
  
  <p>UPDATE: I KNOW HOW TO CONNECT AND GET DATA IN ANDROID FROM REST WEBSERVICE BUT HOW DO WE POST IT ?</p>
  
  <p>My Form method which accepted response from a webclient :</p>
  
  <pre><code>@Path("/create")
      @POST
      @Produces({MediaType.TEXT_HTML,MediaType.APPLICATION_XML})
      @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
      public void newUser(@FormParam("uname") String uname,
              @FormParam("password") String password,
              @Context HttpServletResponse servletResponse) throws IOException {
          boolean unamec= UserLogin.checkuname(uname);
          if (unamec) {
              // User already exists
              servletResponse.sendRedirect("http://mysite/Login.html");
          } else {
              UserLogin u = new UserLogin(uname, password);
              servletResponse.sendRedirec("http://mysite/users/"+uname+"/createnewshop");
          }
      }
  </code></pre>