Examples of XWikiXmlRpcClient


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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        }
    }

    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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        }
    }

    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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        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

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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        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

Examples of org.xwiki.xmlrpc.XWikiXmlRpcClient

        }
    }

    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
Copyright © 2018 www.massapi.com. 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.