how to call web service in java using post method
<pre><code>public static String[] Webcall(String emailID) {
        try {
            URL url = new URL(AppConfig.URL + emailID);
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("POST");
            conn.setRequestProperty("Accept", "application/json");
            conn.setRequestProperty("Authorization", "application/json");
            conn.setRequestProperty("userEmailId", emailID);
            if (conn.getResponseCode() != 200) {
                throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
            }

            BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));

            String output;
            System.out.println("Output from Server .... \n");
            while ((output = br.readLine()) != null) {
                System.out.println(output);
            }

            conn.disconnect();

            org.json.JSONObject _jsonObject = new org.json.JSONObject(output);
            org.json.JSONArray _jArray = _jsonObject.getJSONArray("manager");
            String[] str = new String[_jArray.length()];

        } catch (MalformedURLException e) {

            e.printStackTrace();

        } catch (IOException e) {

            e.printStackTrace();

        }
        return null;

    }
</code></pre>

<p>This is my code I am trying to call web service and get data.</p>

<p>But when I hit web service then I am getting below exception </p>

<blockquote>
  <p>Failed : HTTP error code : 404</p>
</blockquote>

<p>Please suggest me where am doing wrong try to give solution for this .</p>