public String postToServlet(String xmlMove) throws Exception {
        URL url = new URL("http://localhost:8080/Servlet");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("POST");
        conn.setRequestProperty("Content-Type", "text/xml");
        //conn.setRequestProperty("Content-Length", "" +  8);
        conn.setRequestProperty("Content-Language", "en-US");
        conn.setDoInput(true);
        conn.setDoOutput(true);
        PrintWriter pw = new PrintWriter(conn.getOutputStream());
        pw.write(xmlMove);
        pw.close();

        Scanner in = new Scanner(conn.getInputStream());
        in.useDelimiter("");
        StringBuffer retVal = new StringBuffer();
        while (in.hasNext())
            retVal.append(in.next());

        conn.disconnect();

        return (retVal.toString());

    }