Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcHandler


     * @return <code>TRUE</code> if the message has been delivered.
     */
    public static boolean forumPost(String aName, String aEmail, int aForumId, String aSubject,
                                    String aMessage)
    {
        XmlRpcHandler cl = getClient();
        Vector<Object> params = new Vector<Object>(5);
        params.add(StringUtils.toUTF8(aName));
        params.add(StringUtils.toUTF8(aEmail));
        params.add(aForumId);
        params.add(StringUtils.toUTF8(aSubject));
        params.add(StringUtils.toUTF8(aMessage));

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


     */
    private static void loadOPMLURLs()
    {
        if (opmlURLs == null)
        {
            XmlRpcHandler cl = getClient();
            Vector params = new Vector(0);

            try
            {
                opmlURLs = (Map)cl.execute("meta.getOPMLURLs", params);
            } catch (Exception e)
            {
                logError("Could not retrieve OPML URLs.", e);
            }
        }
View Full Code Here

     *
     * @return the hash.
     */
    public static String getPlanHash(String email, String password)
    {
        XmlRpcHandler cl = getClient();

        Vector<String> params = new Vector<String>(2);
        params.add(email);
        params.add(password);

        String hash = null;
        try
        {
            hash = (String)cl.execute("plans.getHash", params);
        } catch (Exception e)
        {
            // No feedback here or we can get in dead cycle
            LOG.log(Level.WARNING, "Failed to get plan hash.", e);
        }
View Full Code Here

        return hash;
    }

    public static Map<String, String> getPlanFeatures(String email, String password)
    {
        XmlRpcHandler cl = getClient();

        Vector<String> params = new Vector<String>(2);
        params.add(email);
        params.add(password);

        Map<String, String> features = null;
        try
        {
            features = (Map<String, String>)cl.execute("plans.getFeatures", params);
        } catch (Exception e)
        {
            // No feedback here or we can get in dead cycle
            logError(Level.WARNING, "Failed to get plan features.", e);
        }
View Full Code Here

        };
    }

    protected XmlRpcHandlerMapping getHandlerMapping() throws IOException,
            XmlRpcException {
        final XmlRpcHandler handler = new XmlRpcHandler(){
            public Object execute(XmlRpcRequest pRequest) throws XmlRpcException {
                final ClientInfo clientInfo = ClientInfoServlet.getClientInfo();
                if (clientInfo == null) {
                    return "";
                }
View Full Code Here

     * @throws XmlRpcNoSuchHandlerException A handler with the given
     * name is unknown.
     */
    public XmlRpcHandler getHandler(String pHandlerName)
            throws XmlRpcNoSuchHandlerException, XmlRpcException {
        XmlRpcHandler result = (XmlRpcHandler) handlerMap.get(pHandlerName);
        if (result == null) {
            throw new XmlRpcNoSuchHandlerException("No such handler: " + pHandlerName);
        }
        return result;
    }
View Full Code Here

   
    return (String[]) list.toArray(new String[list.size()]);
  }

  public String getMethodHelp(String pHandlerName) throws XmlRpcException {
    XmlRpcHandler h = getHandler(pHandlerName);
    if (h instanceof XmlRpcMetaDataHandler)
      return ((XmlRpcMetaDataHandler)h).getMethodHelp();
    throw new XmlRpcNoSuchHandlerException("No help available for method: "
        + pHandlerName);
  }
View Full Code Here

    throw new XmlRpcNoSuchHandlerException("No help available for method: "
        + pHandlerName);
  }

  public String[][] getMethodSignature(String pHandlerName) throws XmlRpcException {
    XmlRpcHandler h = getHandler(pHandlerName);
    if (h instanceof XmlRpcMetaDataHandler)
      return ((XmlRpcMetaDataHandler)h).getSignatures();
    throw new XmlRpcNoSuchHandlerException("No metadata available for method: "
        + pHandlerName);
  }
View Full Code Here

     * @throws XmlRpcNoSuchHandlerException A handler with the given
     * name is unknown.
     */
    public XmlRpcHandler getHandler(String pHandlerName)
            throws XmlRpcNoSuchHandlerException, XmlRpcException {
        XmlRpcHandler result = (XmlRpcHandler) handlerMap.get(pHandlerName);
        if (result == null) {
            throw new XmlRpcNoSuchHandlerException("No such handler: " + pHandlerName);
        }
        return result;
    }
View Full Code Here

   
    return (String[]) list.toArray(new String[list.size()]);
  }

  public String getMethodHelp(String pHandlerName) throws XmlRpcException {
    XmlRpcHandler h = getHandler(pHandlerName);
    if (h instanceof XmlRpcMetaDataHandler)
      return ((XmlRpcMetaDataHandler)h).getMethodHelp();
    throw new XmlRpcNoSuchHandlerException("No help available for method: "
        + pHandlerName);
  }
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.