Posted on 2006-05-04
Last Modified: 2007-12-19
I am geting :
org.apache.xmlrpc.XmlRpcClientException: Failure writing request
 Caused by: org.apache.xmlrpc.XmlRpcException: Unsupported Java type: class java.util.HashMap

Please take a look at the snippet below help out with what i should correct.

=================== code snippet =========
                  HashMap structMap = (HashMap) mySumAndUserDetails.get("userDetails");
                  String email = (String) mySumAndUserDetails.get("email");
                  mySumAndUserDetails.remove("flag"); // ===> email should be in structMap values.
                  Integer checksum = (Integer)mySumAndUserDetails.get("sum") ;
                    XmlRpcClient xmlrpc = new XmlRpcClient ( endpoint );
                          Vector<Object> params = new Vector<Object>(Arrays.asList(new Object[] {"oi-test", email, checksum, structMap, "dh-wrs" }));
                      status = (Object)xmlrpc.execute ("signup_createNewUser", params);  <============
Question by:komlaaa
    LVL 3

    Accepted Solution

    AFAIK, the Apache XML-RPC libraries use the Java 1.0 collection classes.
    You'll need to use Hashtable instead of HashMap.

    try implementing the "userDetails" object as a Hashtable instead of a HashMap

    LVL 3

    Expert Comment

    or u could just replace :

    Vector<Object> params = new Vector<Object>(Arrays.asList(new Object[] {"oi-test", email, checksum, structMap, "dh-wrs" }));


    Vector<Object> params = new Vector<Object>(Arrays.asList(new Object[] {"oi-test", email, checksum, new Hashtable(structMap), "dh-wrs" }));


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Suggested Solutions

    After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now