Package org.xwiki.xmlrpc

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient


    {
    }

    public void testLoginLogout() throws Exception
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);
        rpc.login(TestConstants.USERNAME, TestConstants.PASSWORD);
        rpc.logout();
    }
View Full Code Here


        rpc.logout();
    }

    public void testLoginWithInvalidUser() throws MalformedURLException
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);

        try {
            rpc.login("thisUserShouldNotExist", "foo");
            Assert.fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

        }
    }

    public void testXWikiXmlRpcServiceWithoutLogin() throws Exception, XmlRpcException
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);

        rpc.login("Admin", "admin");

        List<SpaceSummary> spaces = rpc.getSpaces();

        TestUtils.banner("TEST: XWikiXmlRpcServiceWithoutLogin() (Anonymous access)");
        for (SpaceSummary spaceSummary : spaces) {
            System.out.format("%s\n", spaceSummary);
        }
View Full Code Here

        assertTrue(spaces.size() != 0);
    }

    public void testXWikiXmlRpcServiceWithoutLoginNoRights() throws MalformedURLException
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);

        try {
            XWikiPage page = rpc.getPage("Scheduler.WebHome");
            Assert.fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

        }
    }

    public void testGetServerInfo() throws Exception
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);
        rpc.login(TestConstants.USERNAME, TestConstants.PASSWORD);

        ServerInfo serverInfo = rpc.getServerInfo();
        TestUtils.banner("TEST: getServerInfo()");
        System.out.format("%s\n", serverInfo);

        rpc.logout();
    }
View Full Code Here

        setUp(true);
    }

    public void setUp(boolean admin) throws Exception
    {
        this.rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);
        if (admin) {
            this.rpc.login(TestConstants.USERNAME, TestConstants.PASSWORD);
        }
    }
View Full Code Here

        setUp(true);
    }

    public void setUp(boolean admin) throws Exception
    {
        this.rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);
        if (admin) {
            this.rpc.login(TestConstants.USERNAME, TestConstants.PASSWORD);
        }
    }
View Full Code Here

    {
    }

    public void testLoginLogout() throws Exception
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);
        rpc.login(TestConstants.USERNAME, TestConstants.PASSWORD);
        rpc.logout();
    }
View Full Code Here

        rpc.logout();
    }

    public void testLoginWithInvalidUser() throws MalformedURLException
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);

        try {
            rpc.login("thisUserShouldNotExist", "foo");
            Assert.fail();
        } catch (Exception e) {
        }
    }
View Full Code Here

        }
    }

    public void testXWikiXmlRpcServiceWithoutLogin() throws Exception, XmlRpcException
    {
        XWikiXmlRpcClient rpc = new XWikiXmlRpcClient(TestConstants.ENDPOINT);

        rpc.login("Admin", "admin");

        List<SpaceSummary> spaces = rpc.getSpaces();

        TestUtils.banner("TEST: XWikiXmlRpcServiceWithoutLogin() (Anonymous access)");
        for (SpaceSummary spaceSummary : spaces) {
            System.out.format("%s\n", spaceSummary);
        }
View Full Code Here

TOP

Related Classes of org.xwiki.xmlrpc.XWikiXmlRpcClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.