[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

org.apache.xmlrpc.XmlRpcException

Posted on 2006-05-04
2
Medium Priority
?
1,471 Views
Last Modified: 2007-12-19
Hi,
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") ;
                  
                  try{
                    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);  <============
0
Comment
Question by:komlaaa
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
arun_kuttz earned 1000 total points
ID: 16612129
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

-KuTtZ
0
 
LVL 3

Expert Comment

by:arun_kuttz
ID: 16612137
or u could just replace :

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

with

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

-KuTtZ
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

834 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