Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcHandler


     * @throws ServerServiceException in case of errors with communication or account.
     */
    public static void tagsStore(String email, String password, URL aLink, boolean aFeed,
                                 String[] aUserTags, String aDescription, String aExtended) throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(6);
        params.add(getSessionId(email, password));
        params.add(StringUtils.toUTF8(aLink.toString()));
        params.add(aFeed);
        params.add(StringUtils.toUTF8(StringUtils.arrayToQuotedKeywords(aUserTags)));
        params.add(StringUtils.toUTF8(aDescription));
        params.add(StringUtils.toUTF8(aExtended));

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


     * @throws ServerServiceException in case of any errors.
     */
    public void requestPasswordResending(String email)
        throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(1);
        params.add(email);

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

     * @throws ServerServiceException in case of any errors.
     */
    public Map discover(String ref)
        throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(1);
        params.add(ref);

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

        if (LOG.isLoggable(Level.FINE))
        {
            LOG.fine("Suggesting Feed URL: Ref=" + reference + ", Feed URL=" + suggestedFeedUrl);
        }

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

        try
        {
            cl.execute("meta.suggestFeedUrl", params);
        } catch (XmlRpcException e)
        {
            // No feedback here or we can get in dead cycle
        } catch (Exception e)
        {
View Full Code Here

    public static CommunityFields metaGetCommunityFields(String dataUrl)
        throws ServerServiceException
    {
        if (dataUrl == null) return null;

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

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

                                              CommunityFields fields)
        throws ServerServiceException
    {
        if (fields == null || fields.size() == 0) return;

        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(3);
        params.add(getSessionId(email, password));
        params.add(dataUrl);
        params.add(convertToServiceFields(fields));

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

     * @param message error message.
     * @param details error details.
     */
    public static void reportClientError(final String message, final String details)
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(3);
        params.add(message);
        params.add(details);
        params.add(Application.getDescription().getVersion());

        try
        {
            cl.execute("reports.clientError", params);
        } catch (Exception e)
        {
            // No feedback here or we can get in dead cycle
        }
    }
View Full Code Here

     *
     * @return TRUE if successfully sent.
     */
    public static boolean reportFeedback(String message)
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(1);
        params.add(StringUtils.toUTF8(message));

        boolean sent = false;
        try
        {
            cl.execute("reports.feedbackMessage", params);
            sent = true;
        } catch (XmlRpcException e)
        {
            // No feedback here or we can get in dead cycle
        } catch (Exception e)
View Full Code Here

        // We use this property to test new release detection
        // When set the service provides the list of all updates since
        // current version as if the latest version were final.
        boolean productionOnly = System.getProperty("service.checkupdates.allversions") == null;

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

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

     * @throws ServerServiceException in case of any errors.
     */
    public static Map forumGetForums()
        throws ServerServiceException
    {
        XmlRpcHandler cl = getClient();
        Vector params = new Vector(0);

        Map response;
        try
        {
            response = (Map)cl.execute("forum.getForums", 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.