public void run() throws UnknownHostException, IOException,
            ClassNotFoundException {
        // create a socket to connect to the server
        requestSocket = new Socket("localhost", port);
        // get input an output streams
        out = new PrintWriter(requestSocket.getOutputStream());
        out.flush();
        in = new BufferedReader(new InputStreamReader(
                requestSocket.getInputStream()));
        String message = getRequestXml();
        sendMessage(out, message);
        String line = "";
        System.out.print("message: ");
        do {
            line = in.readLine();
            System.out.println(line);
        } while (null != line
                && !(SystemConf.getSocketMessageEndMark().equals(line)));
        do {
            line = in.readLine();
            System.out.println(line);
        } while (null != line
                && !(SystemConf.getSocketMessageEndMark().equals(line)));
        in.close();
        out.close();
        requestSocket.close();
    }