private static synchronized void doLogin()

in src/main/java/org/apache/cxf/cwiki/SiteExporter.java [841:866]


    private static synchronized void doLogin() throws Exception {
        if (loginToken == null) {
            Document doc = DOMUtils.createDocument();
            Element el = doc.createElementNS(SOAPNS, "ns1:login");
            Element el2 = doc.createElement("in0");
            
            if (userName == null) {
                System.out.println("Enter username: ");
                el2.setTextContent(System.console().readLine());
            } else {
                el2.setTextContent(userName);
            }
            el.appendChild(el2);
            el2 = doc.createElement("in1");
            el.appendChild(el2);
            if (password == null) {
                System.out.println("Enter password: ");
                el2.setTextContent(new String(System.console().readPassword()));
            } else {
                el2.setTextContent(password);
            }
            doc.appendChild(el);
            doc = getDispatch().invoke(doc);
            loginToken = doc.getDocumentElement().getFirstChild().getTextContent();
        }
    }