Django Noobie
XMLRPC Noobie
JavaScript (AJAX) Noobie
Jsolait Noobie

Django 0.96
jsolait 1.1 full version
Windows XP


Hello All,

I'm using trying to use JavaScript with Jsolait to invoke a Django
view through Xmlrpc, but I guess there is some problem with the
parsing (Unmashalling) of the XML. The Django code I am using is from
the Wiki Django source code page that can be found here:

http://code.djangoproject.com/wiki/XML-RPC

The Django code from Wiki works perfectly well when I make my call
from the IPyhton shell as follows:

In [1]: import sys
In [2]: import xmlrpclib
In [3]: rpc_srv = xmlrpclib.ServerProxy("http://10.3.0.86:8000/dmm/
xml_rpc_srv/")
In [4]: result = rpc_srv.multiply(30,4)
In [5]: result
Out[5]: 120

However when I try to call it from my JaveScript:

/**
 * Load the xmlrpc object and a proxy to the service
 */
var xmlrpc = null;
var server = null;

try{
    var xmlrpc = importModule("xmlrpc");
    var server = new xmlrpc.ServerProxy('http://10.3.0.86:8000/dmm/
xml_rpc_srv/', ['multiply']);
    var response = server.multiply(2,3);
}catch(e){
    reportException(e);
    throw "importing of xmlrpc module failed.";
}

 I get the following error:

MalformedXmlRpc [module 'xmlrpc' version: 1.3.3]:
      Unmashalling of XML failed.

MalformedXmlRpc [module 'xmlrpc' version: 1.3.3]:
      No documentElement found.


Also, Firefox returns a runtime error on the line that makes the call,
var response = server.multiply(2,3);

I've spent hours, even days Googling and trying different ideas. Does
anyone know what I'm doing wrong?

Thanks,

Mason

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to