Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcHandler


        this.serverLock.lock();

        try {

            final XmlRpcHandler delightHandler = XmlRpcHandlerFactory.createHandlerFor(plugin);

            this.handlerToPluginMap.put(plugin, exportName);

            this.server.addHandler(exportName, delightHandler);
View Full Code Here


     */
    public void registerUser(String fullName, String email, String password, String locale,
                             boolean notifyOnUpdates)
            throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(5);
        params.add(fullName);
        params.add(email);
        params.add(password);
        params.add(locale);
        params.add(notifyOnUpdates);

        String errMessage;
        try
        {
            errMessage = (String)cl.execute("accounts.registerAccount", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

     */
    public static boolean ping()
    {
        boolean online = false;

        XmlRpcHandler cl = getClient();
        Vector params = new Vector(0);

        try
        {
            String response = (String)cl.execute("ping.ping", params);
            online = "pong".equals(response);
        } catch (XmlRpcException e)
        {
            // Service is offline
        } catch (Exception e)
View Full Code Here

     */
    public void ping(long installationId, String appVersion, int runs,
                     String os, String javaVersion, String email, String password)
        throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(7);
        params.add(Long.toString(installationId));
        params.add(appVersion);
        params.add(runs);
        params.add(os);
        params.add(javaVersion);

        if (!StringUtils.isEmpty(email) && !StringUtils.isEmpty(password))
        {
            try
            {
                params.add(email);
                params.add(StringUtils.digestMD5(email, password));
            } catch (NoSuchAlgorithmException e)
            {
                LOG.log(Level.SEVERE, "There's no necessary digesting algorithm implemetned.", e);
            }
        }

        try
        {
            cl.execute("ping.ping1", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

        int userId;
        byte[] opmlBytes = StringUtils.toUTF8(opml);

        Integer sessionId = getSessionId(email, password);

        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(2);
        params.add(sessionId);
        params.add(opmlBytes);

        String errMessage;
        try
        {
            errMessage = (String)cl.execute("sync.storeInUtf8", params);
            userId = getUserId(sessionId);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
View Full Code Here

    public static void syncStorePrefs(String email, String password, Map prefs)
        throws ServerServiceException
    {
        Integer sessionId = getSessionId(email, password);

        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(2);
        params.add(sessionId);
        params.add(prefs);

        try
        {
            cl.execute("sync.storePrefs", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

    public static String syncRestore(String email, String password)
            throws ServerServiceException
    {
        Integer sessionId = getSessionId(email, password);

        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(2);
        params.add(sessionId);
        params.add(OPML_VERSION);

        byte[] opmlBytes;
        try
        {
            opmlBytes = (byte[])cl.execute("sync.restoreInUtf8", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

    public static Map syncRestorePrefs(String email, String password)
        throws ServerServiceException
    {
        Integer sessionId = getSessionId(email, password);

        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(1);
        params.add(sessionId);

        Map prefs;
        try
        {
            prefs = (Map)cl.execute("sync.restorePrefs", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

     * @throws ServerServiceException in case of errors with communication or account.
     */
    private static Integer getSessionId(String email, String password)
            throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(2);
        params.add(email);
        params.add(password);

        Integer idInt;
        try
        {
            idInt = (Integer)cl.execute("accounts.getSessionId", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

     * @throws ServerServiceException in case of errors with communication or account.
     */
    public static List tagsFetch(String email, String password, URL aLink)
        throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(2);
        params.add(getSessionId(email, password));
        params.add(StringUtils.toUTF8(aLink.toString()));

        Vector tags;
        try
        {
            tags = (Vector)cl.execute("tags.getTags", params);
        } catch (XmlRpcException e)
        {
            throw new ServerServiceException(MSG_COM_PROBLEM, e);
        } catch (Exception e)
        {
View Full Code Here

TOP

Related Classes of org.apache.xmlrpc.XmlRpcHandler

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.