public void sendRequest(String theRequest) throws IOException, ParserConfigurationException, SAXException
    {
        out.write(theRequest);
        out.close();
        BufferedReader in = new BufferedReader(new InputStreamReader(httpCon.getInputStream()));
        String inputLine;
        String resXml = "";
        
        while ((inputLine = in.readLine()) != null)
            resXml += inputLine;
        in.close();  
        
        System.out.println(resXml);
        // getting user id
        this.doc = RequestFactory.parseXml(resXml);
        this.id = doc.getElementsByTagName("userid").item(0).getTextContent();
    }